IBM Sterling Transformation Extender

 View Only
  • 1.  Split input file

    Posted Sun November 10, 2019 03:09 PM

    Originally posted by: DenisBE


    Hello,
    I have a card as input.
    This card has a flat file.
    The file contains 1-s records.

    I have five cards out.
    The first card is called by the second.
    The second is called by the third ... etc

    The last card is the "PUT" function to write an XML file with a dynamic name.

    When I process a file with a record, I have an output XML file.

    When I process a file with multiple records, I only have one output XML file.

    While x records in the input flat file must generate x output xml files.

     

    Can someone help me split the input file into multiple output?

    See also print-screen file attached.

    Regard's,

    Denis.

    IBM Transformation Extender Design Studio Version : 10.0.1.0

     


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


  • 2.  Re: Split input file

    Posted Mon November 11, 2019 09:59 AM

    Originally posted by: PaulBrett


    None of the output cards show us any kind of Typetree structure, so it is not easy to tell if you have a repeating group, by the time you get to Output card 5.  

    It might be easier to split the incoming file, and call another map (similar to your current map) for each line in that data, using a RUN() function inside a simple repeating group.

    Thank you.

    Paul

    Follow me on Twitter


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


  • 3.  Re: Split input file

    Posted Thu November 14, 2019 05:05 AM

    Originally posted by: DenisBE


    Hello,

    I implemented the RUN function.
    On WTX the split works.
    But when running on the launcher I have a fail.

    <ExecutionSummary MapStatus="Error" mapreturn="30" ElapsedSec="0.1143" BurstRestartCount="0">
       <Message>FAIL function aborted map:Error: 30
    Message: FAIL function aborted map
    Run</Message>
       <CommandLine>C:\IBM\TransformationExtender_10.0.0\..\map\DMGClosure.mmc</CommandLine>
     

    Do you know the reason for error 30?

    Because the documentation is not too explicit.

    30
    FAIL function aborted map

    This occurs when the FAIL function is used within the map to cause map execution to cease. The return message specified as the second argument of the FAIL function appears in place of the xxx in the Execution Audit section of the Audit Log. See the Functions and Expressions documentation for more information about using the FAIL function.

    Regard's

    Denis

     


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


  • 4.  Re: Split input file

    Posted Wed November 27, 2019 02:38 PM

    Originally posted by: PaulBrett


    In your map, you must have a FAIL() function somewhere.  I am guessing as part of a RUN() function.  Example:

    =VALID(RUN("SubMap.mmc",ECHOIN(1,Input)+" -OE3"),FAIL("The sub map failed"))

    The most likely cause of the disparity between a Command Server/Design Studio execution and a Launcher execution, is the ability to find and run the map.  Launcher may change the current working directory many tmies during execution, so relative paths cannot be used.  A solution might be:

    =VALID(RUN(GETDIRECTORY()+"\SubMap.mmc",ECHOIN(1,Input)+" -OE3"),FAIL("The sub map failed"))

    There are other reasons for the FAIL() being tripped, and further information would be required.

    Thank you.

    Paul

    Follow me on Twitter


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


  • 5.  Re: Split input file

    Posted Thu November 28, 2019 08:00 AM

    Originally posted by: DenisBE


     


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

    Attachment(s)



  • 6.  Re: Split input file

    Posted Mon December 02, 2019 08:48 AM

    Originally posted by: PaulBrett


    You have a RUN() function calling MapDMGClosure, but I can see that your MapDMGClosure has a blue icon, instead of purple.  Blue means that you have not yet defined this map to be an executable map.  Review the input and output cards of this map, and ensure that they have a source and target defined (even dummy ones if required).  Once this map is built, your RUN() function should then be able to find it.

    Thank you.

    Paul

    Follow me on Twitter


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