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

Creating groups within the outbound message

  • 1.  Creating groups within the outbound message

    Posted 04/19/10 08:55 AM

    Originally posted by: NKI


    Hi,

    I'm struggling with a problem I hope you can help me with, when trying to build a map for an ASN (Advanced Ship Notification).

    I'm trying to get from this input format:
    ASN Header
    ASN Line (has order number on it)
    ASN Line (has order number on it)

    to:
    ASN Header
    ASN Order Reference
    ASN Line
    ASN Line

    where the resulting output has one ASN Order Reference segment per unique order number across the ASN lines, and the ASN lines are held as children within the order reference if they share the same order number.

    Example:

    Input:
    ASN Header 1
    ASN Line 1: order ABC123
    ASN Line 2: order CDE234
    ASN Line 3: order ABC123
    ASN Line 4: order CDE234

    Output wanted:
    ASN Header 1
    ASN Order Reference (ABC123)
    ASN Line 1
    ASN Line 3
    ASN Order Reference (CDE234)
    ASN Line 2
    ASN Line 4

    I'm new to WTX so apologies if there is an obvious answer to this, but I would be grateful for any guidance you can give.

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


  • 2.  Re: Creating groups within the outbound message

    Posted 04/21/10 10:26 AM

    Originally posted by: TarunB


    Keith,

    The following will work:-

    1. In a pre-processing map, sort the input records by Order Reference (or ask the file producer to do this before it's sent to TX)

    2. For the next (data transformation) map, your input type tree should utilise control-break logic based on the Order Reference. See thread http://www.ibm.com/developerworks/forums/thread.jspa?threadID=324380&tstart=15 for more information on this.

    3. In the data transformation map:
    • pass each control-break group (i.e. set of records related by Order Reference) to a functional map.
    • code the functional map to create the output below

    Your output tree will look something like:-
    ASN Header (1:1)
    OrderRef Group (0:s) consisting of records below <---- functional map call at this level
    ---ASN OrderReference (1:1)
    ---ASN Line (1:s)
    Seems like you're in the UK - give me a shout if I can help further. I'm not on here much but there are a few good people who'll help otherwise.

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