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.  Calling different functional map levels from IF

    Posted 01/23/07 04:02 PM

    Originally posted by: SystemAdmin


    OS XP
    Map designer 8.0

    Question -- I want a map rule to determine whether to batch on submitter or group_dest based on a field in my trading partner table.

    =IF(WORD(Data,"|",1) = "MULTI",
    f_data_multi(submitter:group_dest:data, data2,data3,data4),
    f_data_single(group_dest:data, data2,data3,GET ("DB","-DBTYPE ODBC -SOURCE ECTP -STMT exec usp_get_next_gs 'xxxxxx',13 -T+")))

    While the map compiles fine, the rule doesn't work. The way it is written works for Multi (I get multiple GS). However, when I remove the word Multi, I get three iterations of the GS. For it to work for the single, I change the f_data_multi to the following:
    f_data_multi(group_dest:data, data2,data3,data4) -- which doesn't work for Multi (I only get the first GS/ST).

    Is there a way to call different type tree levels from the same IF?

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


  • 2.  Re: Calling different functional map levels from IF

    Posted 01/24/07 09:51 AM

    Originally posted by: SystemAdmin


    We had a similar issue where I was calling different functional maps using EITHERs and we got duplicates in the output.I send an issue call to support and this is what I got as answer:

    [i]"This behavior is not a bug: it's the way the product works.If you have a rule that says X(S) = IF (A = 1, B, C)
    ...and there's one instance of A (that is equal to 1), one instance of B, and multiple instances of C, we'll produce B as the result of the rule_____ multiple times (once for each C in the input, even though C isn't relevant to the output of the rule).That's what's going on here, but the names are more complicated than A, B, and C, and the rule is considerably more complicated.

    This idea of using a series of EITHERs to map stuff will have this problem and the map needs to be redesigned.
    Between irrelevant objects being changed (causing duplicates like the ones you see in this test case), you likely have binding problems in the LOOKUPs.This rule just isn't a good idea."[/i]

    I never figured out a good way to solve the problem. Our output was good except it contained duplicates, so what I did is use UNIQUE() on the output. Not pretty but good enough for me...
    #DataExchange
    #IBM-Websphere-Transformation-Extender
    #IBMSterlingTransformationExtender


  • 3.  Re: Calling different functional map levels from IF

    Posted 01/24/07 10:00 AM

    Originally posted by: janhess


    You could use 2 output cards - one for each part of the IF.
    #DataExchange
    #IBM-Websphere-Transformation-Extender
    #IBMSterlingTransformationExtender


  • 4.  Re: Calling different functional map levels from IF

    Posted 01/24/07 06:07 PM

    Originally posted by: jvanboga


    You could also try adding an index.

    GS INDEX (1) (0:1)

    =IF(WORD(Data,"|",1) != "MULTI",
    f_data_single(group_dest:data, data2,data3,GET ("DB","-DBTYPE ODBC -SOURCE ECTP -STMT exec usp_get_next_gs 'xxxxxx',13 -T+")))

    GS INDEX (2) (0:n)

    =IF(WORD(Data,"|",1) = "MULTI",
    f_data_multi(submitter:group_dest:data, data2,data3,data4))
    #IBMSterlingTransformationExtender
    #DataExchange
    #IBM-Websphere-Transformation-Extender


  • 5.  Re: Calling different functional map levels from IF

    Posted 01/25/07 06:49 AM

    Originally posted by: SystemAdmin


    I did try that also, doesnt work.

    The product is working as intended as responded by support. Please read my post above. Such a mapping rule is officially not a good idea.
    #DataExchange
    #IBMSterlingTransformationExtender
    #IBM-Websphere-Transformation-Extender


  • 6.  Re: Calling different functional map levels from IF

    Posted 01/25/07 11:58 AM

    Originally posted by: SystemAdmin


    I decided to create two different output cards -- works fine now.
    #IBMSterlingTransformationExtender
    #IBM-Websphere-Transformation-Extender
    #DataExchange