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.  Run function from a component rule

    Posted 11/09/09 08:24 AM

    Originally posted by: SystemAdmin


    Hello All

    I read in the document that we can use RUN function at component rule to execute another compiled map.
    My requirement is to call a compiled map-(which actually sorts the data) in another map say map2(Which takes sorted data to generate XML output file).

    I have tested these 2 maps independently and its working fine. Now I want to integrate in one map.Can anyone tell me the easiest way to achieve above task?

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


  • 2.  Re: Run function from a component rule

    Posted 11/09/09 08:55 AM

    Originally posted by: raj1


    You can use a Run function in component rule.But why do you want to complicate this simple scenario?You can call the map2 from map1 using run function very easily in that way you can integrate it into one system
    #DataExchange
    #IBM-Websphere-Transformation-Extender
    #IBMSterlingTransformationExtender


  • 3.  Re: Run function from a component rule

    Posted 11/09/09 09:22 AM

    Originally posted by: repanzer


    There’s so many ways to achieve this, but I would consider the easiest is to have the output of the first map be a file, and the second map has a trigger on that file to kick off when it is created.

    But yes, you can have what we call a “control map”, which still kicks off by a trigger, whether a file or message queue.

    So a message comes to that map, and that map has “blob” input; it doesn’t validate. In one of the rules, you say;

    RUN(“c:\temp\maptorun.mmc”, over ride input adapter commands, over ride output adapter commands , PACKAGE(INPUT)

    When running a map using the RUN function, you can override just about all the settings, if not all of them. So one reason to use a control map is if you want to over ride the settings.

    For you, you would run the first map, give it an output filename, then RUN the second map and override the input of the second map to the output of the first.

    Or you would run the first map and use –OE1 and echo back the output from the run map back into the component rule that ran it. Then ECHOIN that data into input for the second run map.

    Still; unless you have some need beyond file in-file out, I would not use a RUN statement. It’s so much easier to point and click the map setting then it is to build the Run statement.

    Then again, you may not even need the RUN statement to achieve what you want. Take a look at my response in this thread; if you have 3 output cards, you can use the data you just built as input into subsequent output cards.

    http://www.ibm.com/developerworks/forums/thread.jspa?threadID=282917&tstart=0
    #DataExchange
    #IBMSterlingTransformationExtender
    #IBM-Websphere-Transformation-Extender


  • 4.  Re: Run function from a component rule

    Posted 11/10/09 01:48 AM

    Originally posted by: SystemAdmin


    Thanks a lot!
    I have used below logic and its working fine now.

    1) MAP#1 (sort.mmc)

    INPUT CARD#1:
    FILE_IN
    ORDER(s)

    OUTPUT CARD#1 (same type tree) :
    FILE_OUT
    ORDER(s) = SORTUP (ORDER:FILE_IN)

    OUTPUT CARD#2 (blob item) :
    RUN ("map2.mmc", HANDLEIN (1, PACKAGE(FILE_OUT))

    2) MAP#2 (map2.mmc)

    INPUT CARD#1:
    FILE_IN
    ORDER_SET(s)
    ORDER(s) Order# ORDER:$= Order# ORDER:$LAST
    Order#
    field2
    field3
    field4
    field5

    OUTPUT CARD#1 : whatever target format you need

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