IBM Sterling Transformation Extender

Sterling Transformation Extender

Come for answers, stay for best practices. All we're missing is you.


#Sterling
#Supplychain
 View Only
  • 1.  Batch file and shell script adapters

    Posted 08/24/15 05:59 AM

    Originally posted by: KYPWTX


    Hello all,

    Can anyone please tell me how to create a simple map using batch file and shell script adapters.?

    Thank you


    #DataExchange
    #IBM-Websphere-Transformation-Extender
    #IBMSterlingTransformationExtender


  • 2.  Re: Batch file and shell script adapters

    Posted 08/24/15 12:08 PM
      |   view attached

    Originally posted by: paul.brett


    Attached you will find an example using the Batch adapter.

    Thank-you.

    Paul.

    Follow me on Twitter


    #IBMSterlingTransformationExtender
    #IBM-Websphere-Transformation-Extender
    #DataExchange

    Attachment(s)

    zip
    Batch.zip   2 KB 1 version


  • 3.  Re: Batch file and shell script adapters

    Posted 08/24/15 12:09 PM

    Originally posted by: paul.brett


    Who wants to have a stab at a Shell Script adapter version of this map?

    Thank-you.

    Paul.

    Follow me on Twitter


    #DataExchange
    #IBMSterlingTransformationExtender
    #IBM-Websphere-Transformation-Extender


  • 4.  Re: Batch file and shell script adapters

    Posted 08/24/15 12:22 PM
      |   view attached

    Originally posted by: KYPWTX


    Hi Paul,

         Thanks for the reply.

    When I am running the map,it is coming as Input valid but unknown error.

    I have done a simple map using batch file adapter.I am sending the attachment.

    So,wlii you please check it and say me if I did anything wrong??

         Thank you in advance.


    #DataExchange
    #IBM-Websphere-Transformation-Extender
    #IBMSterlingTransformationExtender

    Attachment(s)

    zip
    Batch File.zip   4 KB 1 version


  • 5.  Re: Batch file and shell script adapters

    Posted 08/25/15 04:20 AM

    Originally posted by: paul.brett


    Your trace shows:

    (Level 1: Offset 0, len 13, comp 1 of 1, #1, DI 000000000001:)
    Data at offset 0 ('Notepad<CR><LF><CR><LF><CR><LF>') was found to be of TYPE
       X'0003' (Item Root).

    (Level 0: Offset 0, len 13, comp 1 of 0, #1, DI 000000000002:)
    Data at offset 0 ('Notepad<CR><LF><CR><LF><CR><LF>') was found to be of TYPE
       X'0002' (Group Root).

       INPUT 1 was valid.

    ....which means you are reading your batch script in using the FILE adapter (not sure why) and then in your output card, you are using the Batch adapter to call it:

    "-CMD Kusuma.bat"

    ....and on my system, the batch script runs straight away, and fires-up the Notepad application.  The map will not terminate, until the Notepad is closed.

    Everything seems to be working.  What were your expectations here?

    Thank-you.

    Paul.

    Follow me on Twitter


    #DataExchange
    #IBM-Websphere-Transformation-Extender
    #IBMSterlingTransformationExtender


  • 6.  Re: Batch file and shell script adapters

    Posted 08/25/15 05:13 AM

    Originally posted by: KYPWTX


    Hello Paul,

     As you have said, I have given Batch File adapter in my input card and I gave the command as -CMD Kusuma.bat. And in my output card ,I have given File adapter..

    We have some commands for the batch file adapter like -AUDIT[+][S] [full_path],-FILE [transfer_file] etc..

    So,how can we work with these commands???

     


    #DataExchange
    #IBM-Websphere-Transformation-Extender
    #IBMSterlingTransformationExtender


  • 7.  Re: Batch file and shell script adapters

    Posted 08/25/15 07:15 AM

    Originally posted by: KYPWTX


    Can I know how to work with shell script adapters??


    #IBM-Websphere-Transformation-Extender
    #IBMSterlingTransformationExtender
    #DataExchange


  • 8.  Re: Batch file and shell script adapters

    Posted 08/25/15 01:03 PM

    Originally posted by: paul.brett


    I have given Batch File adapter in my input card and I gave the command as -CMD Kusuma.bat. And in my output card ,I have given File adapter.

    Not true.

    You gave FILE in your input card.  You read the batch file.  There is no point doing this.  Your input card is redundant.

    You gave BATCH in your output card.  The command was:

    -CMD Kusuma.bat

    We have some commands for the batch file adapter like -AUDIT[+][S] [full_path],-FILE [transfer_file] etc..  So,how can we work with these commands???

    Change your output card adapter command line to:

    -CMD Kusuma.bat -A

    ...is the simple answer.

     

    The examples I have given can be revised (after reading the documentation) to be used with the Shell Script adapter as well.

     

    Thank-you.

    Paul.

    Follow me on Twitter


    #IBM-Websphere-Transformation-Extender
    #IBMSterlingTransformationExtender
    #DataExchange


  • 9.  Re: Batch file and shell script adapters

    Posted 08/25/15 01:25 PM

    Originally posted by: KYPWTX


    Hello Paul

     What you have said is true.I changed to  Batch File adapter in my input card and I gave the command as -CMD Kusuma.bat. And in my output card ,I have given File adapter..Commands are also working perfectly.

    So,I just want to know abut shell script adapters?


    #IBM-Websphere-Transformation-Extender
    #IBMSterlingTransformationExtender
    #DataExchange