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.  multiple input records element to one output record element

    Posted 08/20/09 09:53 AM

    Originally posted by: vamseedhar


    Have requirement to combine all the repetable record elements need to be appended to one record element only. Something as shown below, its a HL7 message, is this possible doing in WTX map. If so please suggest how it can be achived, tried different options of like creating functional map, SINK but could not get to it.
    INPUT
    OBX|1|||||||
    NTE|1||abc
    NTE|2||xyz
    NTE|3||ghg
    OBX|2||||||
    NTE|1||aaa
    NTE|2||bbb

    Need the output to be like
    OBX|1|||||||
    NTE|1||abc xyz ghg
    OBX|2||||||
    NTE|1||aaa bbb
    Thanks
    #IBM-Websphere-Transformation-Extender
    #IBMSterlingTransformationExtender
    #DataExchange


  • 2.  Re: multiple input records element to one output record element

    Posted 08/20/09 11:10 AM

    Originally posted by: TarunB


    I believe you want to look at using Control Break logic in your type tree, feeding each control group into a functional map to perform the amalgamation of data.

    This would assume that the natural order of the source data is OBX / NTE / OBX / NTE etc.

    I would write more but have to get going - try searching this site for it. Let us know if you don't find anything and I'm sure you'll get a response to it.
    #DataExchange
    #IBMSterlingTransformationExtender
    #IBM-Websphere-Transformation-Extender


  • 3.  Re: multiple input records element to one output record element

    Posted 08/20/09 11:34 AM

    Originally posted by: SystemAdmin


    There a number of ways of doing this. The approach you need to take depends on how the type tree is structured. Is your OUTPUT tree's NTE 03 element a single field or is it defined as a delimited, repeating field? If its a single field, do the values need to be delimited by a space character?

    If NTE 03 is a single field, your best option is to edit the type tree to make it a space delimited, repeating field, which will allow a simple map rule to be used. If you can't edit the type tree, and the output data does not need to be space-delimited you can just use the SERIESTOTEXT function. If your OUTPUT needs to be space-delimited and you have a known maximum possible number of INPUT NTE records, you could even create a crude rule like:

    =TRIMRIGHT(NTE03:NTE[1] + " " + NTE03:NTE[2] + " " + NTE03:NTE[3] + " " + NTE03:NTE[4] + " " + NTE03:NTE[5])

    That would be my least favorite option, but in a pinch it would work.
    #DataExchange
    #IBM-Websphere-Transformation-Extender
    #IBMSterlingTransformationExtender


  • 4.  Re: multiple input records element to one output record element

    Posted 08/20/09 12:54 PM

    Originally posted by: vamseedhar


    SERIESTOTEXT function used if the element is repeated it concatnate, show below how it works.

    INPUT
    NTE|1||a~b~c
    NTE|2||x~y~z

    OUTPUT
    NTE|1||abc
    NTE|2||xyz

    But in my case next seconf NTE comes in picture only in the next iteration, so I should able to append to this second NTE from input to already mapped output NTE.

    so my output should be only 1 NTE

    NTE|1||ax~by~cz
    Hope have explained clearly what am looking for.

    Still working on it, Thanks for all the responses. Please post your suggestions.
    #IBMSterlingTransformationExtender
    #DataExchange
    #IBM-Websphere-Transformation-Extender


  • 5.  Re: multiple input records element to one output record element

    Posted 08/24/09 05:30 PM

    Originally posted by: repanzer


    Input;
    FILE
    GROUP
    OBX
    NTE(0:10)
    ....NTE01
    ....NTE02(S)
    Output

    FILE
    GROUP
    ..OBX
    ..NTE(0:10)
    ....NTE01
    ....NTE02(S)
    When you map to the second field in NTE (NTE02),

    fmap(EXTRACT(NTE02 IN GROUP:FILE, NTE02 > " "))

    Basically, extract the second field from all the NTE segments that have data in the second field, ;

    OBX|1|||||||
    NTE|1||abc
    NTE|2||xyz
    NTE|3||ghg
    and map them to the repeatable field of NTE02 in ONE NTE

    OBX|1|||||||
    NTE|1||abc~xyz~ghg
    #IBMSterlingTransformationExtender
    #DataExchange
    #IBM-Websphere-Transformation-Extender


  • 6.  Re: multiple input records element to one output record element

    Posted 08/24/09 05:40 PM
      |   view attached

    Originally posted by: repanzer


    Check the attached pic, hopefully it will help. It shows a functional map that EXTRACT all the second field in mulitiple NTE segments, and places then one by one in the second field of ONE NTE.
    #IBMSterlingTransformationExtender
    #IBM-Websphere-Transformation-Extender
    #DataExchange


  • 7.  Re: multiple input records element to one output record element

    Posted 08/25/09 10:15 AM

    Originally posted by: vamseedhar


    Thanks, that helped a lot.
    #IBM-Websphere-Transformation-Extender
    #DataExchange
    #IBMSterlingTransformationExtender