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.  Nested Functional Map calls

    Posted 10/12/11 05:05 AM

    Originally posted by: SystemAdmin


    Hi, I am after some help on this one please.

    We are processing an order message complete with repeatable line level data.
    We are having to extract some of the line level data and write an output file, however 4 of the line level fields do not have their source in the input file and requires a database instead, each from the same table.
    I can achieve this result easily by coding the DB lookup with each field, however this results in 4 separate calls to same part master table for each line which is inefficent and I wish to bring back the fields required (only 3, as 1 is placed into 2 fields on the output message) as a single | delimeted piece of text / blob as past it to functional map. It can then use the WORD function to extract the appropriate piece of data.

    We are trying to achieve this by initially calling a functional map F_CreateLines for each order line.
    Within F_CreateLines, we are calling F_CreateLine passing the fields required to write the output line, including the result of another functional map, F_GetPartDB, which gets the 3 fields as a | delimeted peice of text. See the rule below:

    =F_Create_Line(SHIPMENT_ORDLIN_SEG #CHILDDATA:.:Shipment,
    F_GetPartDB (PART_NUM #DATA:.:Shipment, MapParameters)
    )

    This is compiling, but producing weired results, where as hardcoding the output of F_GetPartDB as below produces perfect results

    =F_Create_Line(SHIPMENT_ORDLIN_SEG #CHILDDATA:.:Shipment,
    "Field 1|Field 2|Field 3"
    )

    According the the dbl files being written, F_GetPartDB is retreiving the correct text and I really am after confirmation that it is valid to call a functional map, to use the output as a parameter for a call to another functional map. Should this have be structured differently?

    Thanks in advance,
    #DataExchange
    #IBMSterlingTransformationExtender
    #IBM-Websphere-Transformation-Extender


  • 2.  Re: Nested Functional Map calls

    Posted 10/12/11 07:52 AM

    Originally posted by: NancyR


    You need to get the results of running your F_GetPartDB functional map before you run F_Create_Line. Perhaps you could create an additional output card at the executable map level and create an array that has a row for each line level data you're extracting. Each row would contain a key to tie back to the line level record and the three database fields. Then pass that card as the second parameter in the F_Create_Line call in place of F_GetPartDB (PART_NUM #DATA:.:Shipment, MapParameters).
    #DataExchange
    #IBMSterlingTransformationExtender
    #IBM-Websphere-Transformation-Extender


  • 3.  Re: Nested Functional Map calls

    Posted 10/12/11 09:46 AM

    Originally posted by: SystemAdmin


    We have found a solution, albeit it does not answer my question of whether it is acceptable to nest calls to functional maps inside each other with in a rule.

    We found that rather than calling a functional map to do the database lookup, we coded the VALID / DBLOOKUP / FAIL directly as one of the parameters of the outer functional map F_CreateLine and this indeed works fine.

    Hope that helps someone..
    #DataExchange
    #IBMSterlingTransformationExtender
    #IBM-Websphere-Transformation-Extender