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.  how to create multiple output files dynamicaly based on input records

    Posted 01/27/12 07:45 PM

    Originally posted by: bubai_das


    Hi,

    I am new to WTX. I have a requirement to create multiple output file based on the value of input records. For example, in the input card there will be five fields: Emp ID,First Name, Middle Name, Last Name and country. Now in the input file there are 10 records. I need to create separate output files based on the value of the country. If there are 4 records with country USA and 6 records with country FRA in the input file then I need two output file for each country.

    I have already go through the example given in the link:
    https://www.ibm.com/developerworks/forums/thread.jspa?messageID=14081552&#14081552

    But as per the link it generate each 10 output file for 10 records in the input file.

    I have also added the map file, Type Tree and the input file. Request your help.
    #IBM-Websphere-Transformation-Extender
    #IBMSterlingTransformationExtender
    #DataExchange


  • 2.  Re: how to create multiple output files dynamicaly based on input records

    Posted 02/07/12 01:11 AM
      |   view attached

    Originally posted by: SudhanshuSawlani


    Hello man

    I understand your requirement is to create number of output files based on a value from the input file in the particular record.

    You will need to add as many output cards as the number of files you wish to output. Then, a condition to check if that record satisfies the criteria (in your case Ctry = USA or Ctry=FRA) following which the record will be populated.

    I have created a sample for you. Please take a look and revert for any worries or queries.

    Cheers
    Sudhanshu.
    #IBM-Websphere-Transformation-Extender
    #IBMSterlingTransformationExtender
    #DataExchange

    Attachment(s)



  • 3.  Re: how to create multiple output files dynamicaly based on input records

    Posted 02/21/12 05:03 AM

    Originally posted by: TarunB


    A restrictive design will force re-development of the map each time you have another country, and eventually this will become unwieldy and will have ongoing support costs.

    A more comprehensive solution would be to use control-break logic on the Country field, to create dynamic groups during map execution. Each group is then passed through a functional map to a simple RUN map, which performs the mapping and outputs a file with a unique name.

    The second map is therefore run as many times as you have Country codes in your original file. This design will automatically deal with any number of countries without needing to be amended if you have more or less countries in the original file, and you won't need to know the list of countries beforehand.

    Again, with WTX there are many ways to achieve the same intended result. It's all about getting there in the most efficient manner, whilst keeping development and support efforts at a reasonable level.
    #IBMSterlingTransformationExtender
    #DataExchange
    #IBM-Websphere-Transformation-Extender