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.  Multikey Sort

    Posted 05/09/11 05:25 PM

    Originally posted by: JRules


    Experts,

    Here is the deal:

    Input File
    **********
    14 Abercrombie
    17 American Eagle
    11 Nautica
    13 Tommy Hilfiger
    12 Tommy Hilfiger
    10 American Eagle
    10 Tommy Hilfiger
    10 Abercrombie
    17 Abercrombie

    My Output should look like this:

    10 Abercrombie
    10 American Eagle
    10 Tommy Hilfiger
    11 Nautica
    12 Tommy Hilfiger
    13 Tommy Hilfiger
    14 Abercrombie
    17 American Eagle

    Basically, I am sorting the first column (ID) and then sorting the Names for those corresponding IDs. Am still in the newbee status in WTX. So, please bear with me while I ask a lot of questions. I have a type tree like this:

    InputGroup
    InputRecs (1:s)
    ID
    Name

    What I have done so far in the map is that I have two output cards, one that sorts out the IDs and Names. In the second output card, I have a functional map with the below rule:

    =F_Output(EXTRACT(InCard1,(ID DataElements:InputRec1 DataRecs:InCard1=UNQID DataElements:SortCard & EName DataElements:InputRec1 DataRecs:InCard1=UnqNames DataElements:SortCard)))

    Where,
    InCard1 is my input card
    ID is the ID element in the input
    EName is Name element in the input
    UNQID is the UNIQUE IDs from the sorted list (2nd output card)
    UNQNAMES is the UNIQUE Names from the sorted list (2nd output card).

    I am able to execute this map but the output looks terrible. Please help me understand the solution. Thanks!
    #IBMSterlingTransformationExtender
    #IBM-Websphere-Transformation-Extender
    #DataExchange


  • 2.  Re: Multikey Sort

    Posted 05/10/11 05:36 AM

    Originally posted by: TarunB


    Take a look at SORTUP.

    i.e. your output card will be have the same structure as your input card, and the only rule you will need is SORTUP (InputRecs)
    #IBM-Websphere-Transformation-Extender
    #IBMSterlingTransformationExtender
    #DataExchange


  • 3.  Re: Multikey Sort

    Posted 05/10/11 11:52 AM
      |   view attached

    Originally posted by: JRules


    For those who is interested in knowing the solution, please see the attached zip file. Basically, I have used an extract function on a pre-sorted list.
    #IBM-Websphere-Transformation-Extender
    #DataExchange
    #IBMSterlingTransformationExtender

    Attachment(s)