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

WTX structural mapping

  • 1.  WTX structural mapping

    Posted 12/14/15 08:36 AM

    Originally posted by: Karthik12r


    Hello,

     

    I need help/suggestion with one of my requirements in WTX. Below is my input tree,

     

    Row(S)

    BatchID

    BatchX

    BatchY

    InstructionID

    InstructionX

    InstructionY

    TransactionID

    trsansactionX

    TransactionY

     

    My output tree has multiple levels - Batch , Instruction, Transaction as below XML,

    Batch1
         Instruction1
              Transaction1
              Transaction2
         Instruction2
              Transaction3
    Batch2
         Instruction1
              Transaction4

     

     

     

     

     

     

     

    To achieve this, am trying to use UNIQUE() to extract Batch records, and pass it to functional map, and then soon. But I am not getting the expected output. I get more Instruction tags than i should get under a batch.

    Can anyone please suggest the best way to accomplish this.

     

    Thanks

    karthik


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


  • 2.  Re: WTX structural mapping

    Posted 12/15/15 02:29 AM

    Originally posted by: Henry (Response)


    Hi Karthik,

     

    As you describe you should work from toplevel Batch down to Instruction, Transaction. At the toplevel you can create the Batch using a functional map (F_Create_Batch(UNIQUE(Batch), Input1)). You should pass all the Unique Batches and next to that the complete Input Card. Within F_Create_Batch you can map all the Batch items but you also need to create a Functional map F_Create_Instruction. You must pass an extract of Input1 containing all instructions belonging to this Batch, You can use the EXTRACT function for this.

    If you define the correct condition then the functional map will create the exact amount of instructions belonging to this Batch instance. Do not forget to include the whole Input1 again as you need it in your next Functional Map to create the transactions.

     

    Kind Regards, Henry


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