IBM Sterling Transformation Extender

Sterling Transformation Extender

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


#Sterling
#Supplychain
 View Only
Expand all | Collapse all

Problem in Handling Multiple occurence data based on data in next iterationn

  • 1.  Problem in Handling Multiple occurence data based on data in next iterationn

    Posted 06/08/16 07:48 AM

    Originally posted by: mohit121happy


    Objective :

    We have multiple occurrence of some data in WTX, which gets passed to functional map one by one.

    The problem is to extract some specific information from only those next  records which have value ZERO for one of the field and merge it  into the record which comes before it and have Non ZERO value.

     

     

    Description :

     

    In WTX multiple data passes to Functional Map one by one, it can be read and write  as per requirement.

    But problem is  to check the next records which have value ZERO in one of the field and only extract the specific information from it to merge into its previouse Non Zero record.

    No need to write those ZERO Records in the Output.

     

     

    Here in our case, the only information that available is, we have to extract some specific information from only those next  records which have value ZERO for one of the field and merge it  into the record which comes before it and have Non ZERO value.

     

    See Below Example.We have Input file(Fixed Length) like below :

    SM Records

       DT1 Record  -

                    Amount 20 | Reference ABC

       DT2 Record  -

    Amount 00 | Reference DEF

       DT3 Record  -

    Amount 00 | Reference GHI

       DT4 Record  -

    Amount 30 | Reference JKL

       DT5 Record  -

    Amount 00 | Reference MNO

     

    Output :

       

    In Output, we have to merge the Reference value of DT Records for  Amount 00 into its previouse DT Record which have Amount not equals to 00.

     

    For eg :

     

    As DT2 Record have Amount 00, so we have to extract its Reference(i.e DEF) and merge it into the DT1 Record because it  has Amount Non Zero .

    Again DT3 have Amount 00, so merge it to its previouse Non Zero DT Record i.e DT1 .

     

    Same should be applicable for DT4 and DT5.

    As you can see that DT5 have Amount = 00, and hence it should be merge into its prior Non ZERO DT Record i.e DT4

     


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


  • 2.  Re: Problem in Handling Multiple occurence data based on data in next iterationn

    Posted 06/08/16 01:09 PM
      |   view attached

    Originally posted by: DeM0n


    The best way is to get the correct Input type tree...You need to define your input type tree the way you have defined your input data above...

    I have attached an example map to explain this..Check how Group is defined in the Input category....I am assuming that the first amount is not 00...you can play around with this if this is not the case....

    I build this map in WTX 8.4 so you need this or higher to open it...Hope it helps....

     


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

    Attachment(s)

    zip
    Test.zip   1 KB 1 version