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.  Forcing output from a RUN() map when content is 0 bytes

    Posted 01/21/15 07:56 AM

    Originally posted by: paul.brett


    Copied from another forum:

    "I have a main map calling a another map and putting data to a file from the first card using "-OF1".

    If RUN map doesn't create any data, as the output card set to CreateOnContent it is not generating any file.

    My query is even if RUN map not generate data I need to create empty file.  It obviously works if I change the output card setting from CreateOnContent to Create in the run map, but in this case I'm unable to do that because the map is used by some other interfaces.

    All I can work on is the top level map, making the RUN() call.  Any suggestions?"

    Tricky one this....

    Thank-you.

    Paul

    Follow me on Twitter


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


  • 2.  Re: Forcing output from a RUN() map when content is 0 bytes

    Posted 01/21/15 07:58 AM

    Originally posted by: paul.brett


    Here's one solution:

    Change the calling RUN() rule from:

    =VALID(RUN("Test2",ECHOIN(1,In1)+" -OF1 Output.txt"),FAIL(LASTERRORCODE()))

    to

    =VALID(RUN("Test2",ECHOIN(1,In1)+" -OASINK1K'Output.txt'"),FAIL(LASTERRORCODE()))

    ...sending the output to SINK, but forcing a creation of a backup, to contain the actual data, even if it is empty.

    Any other suggestions?

    Thank-you.

    Paul

    Follow me on Twitter


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


  • 3.  Re: Forcing output from a RUN() map when content is 0 bytes

    Posted 01/27/15 07:07 AM

    Originally posted by: Laurent(Satisco)


    There could be one obvious... the -OF1 should either force the creation of the file (since X0 is there to do the "createoncontent" stuff, or there should be a setting to override the "createoncontent" which was compiled in the map.

     

    Another one, depending on what you can do at the "caller" map, would be to use -OE1 and write the file from the caller map.


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