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.  Problem in Using EITHER with choice group

    Posted 05/03/07 01:03 AM

    Originally posted by: deepthideeps


    Hi,

    I am experiencing a problem in using EITHER with choice groups.

    My requirement is:

    The output should be REF02 if REF01=1A, 1B, 1D or 1C if present in input, else " ".

    REF is a choice group. It can have REF*1A, REF*1B, REF*1D and1C.

    Map rule EITHER ( (REF02,REF01=1A), (REF02,REF01=1B), (REF02,REF01=1C), (REF02,REF01=1D)," ")

    If the input file contains REF*1A, it will display the output correctly.

    That is the first condition in EITHER.

    If the input contains 1B, 1C or 1D it will display " " instead of REF02

    If I remove the " " from the map rule, it will check for all REF segment and display the output correctly.

    Please advise me how to resolve this problem???

    Thanks,
    Deepthi
    #DataExchange
    #IBMSterlingTransformationExtender
    #IBM-Websphere-Transformation-Extender


  • 2.  Re: Problem in Using EITHER with choice group

    Posted 05/03/07 03:12 AM

    Originally posted by: Kepa_Screen


    I think you can try with several nested IF's. instead of using EITHER.
    #IBMSterlingTransformationExtender
    #IBM-Websphere-Transformation-Extender
    #DataExchange


  • 3.  Re: Problem in Using EITHER with choice group

    Posted 05/03/07 04:11 AM

    Originally posted by: deepthideeps


    Nested IF also gives the same result.

    Thanks,
    Deepthi
    #DataExchange
    #IBM-Websphere-Transformation-Extender
    #IBMSterlingTransformationExtender


  • 4.  Re: Problem in Using EITHER with choice group

    Posted 05/03/07 04:24 AM

    Originally posted by: janhess


    Your rule doesn't look right. The syntax for either is EITHER ( try_this { , if_none-try_this } ) so your rule should be
    IF(REF01="1A" | REF01="1B" | REF01="1C" | REF01="1D",REF02," ")
    #IBM-Websphere-Transformation-Extender
    #DataExchange
    #IBMSterlingTransformationExtender


  • 5.  Re: Problem in Using EITHER with choice group

    Posted 05/03/07 04:34 AM

    Originally posted by: deepthideeps


    In the type tree these REF1A ,REF1B,are separate groups. REF qualifiers (1A, 1B,.) are specified in the type tree.

    REF

    REF1A (REF01+REF02)

    REF1B (REF01+REF02)

    REF1C (REF01+REF02)

    REF1D (REF01+REF02)

    Could have used this solution if there is only one REF segment with different values of REF01.

    Thanks,
    Deepthi
    #DataExchange
    #IBMSterlingTransformationExtender
    #IBM-Websphere-Transformation-Extender


  • 6.  Re: Problem in Using EITHER with choice group

    Posted 05/03/07 04:42 AM

    Originally posted by: janhess


    So can you do
    IF(present(REF1A),"1A",IF(present(REF1B),"1B", IF(present(REF1C),"1C" ,IF(present(REF1D),"1D"," ")))))
    #IBMSterlingTransformationExtender
    #IBM-Websphere-Transformation-Extender
    #DataExchange


  • 7.  Re: Problem in Using EITHER with choice group

    Posted 05/03/07 04:52 AM

    Originally posted by: deepthideeps


    Yes.. We can do that.But in that case another issue arises.

    If input contains REF*EI and then REF*1A, output will be " ". Not REF*1A.

    After checking the first REF segment it's going to the default condition (" ").

    Not checking the second REF segment.

    Here also if space is removed, output will be as expected(REF*1A).

    Thanks,
    Deepthi
    #DataExchange
    #IBMSterlingTransformationExtender
    #IBM-Websphere-Transformation-Extender


  • 8.  Re: Problem in Using EITHER with choice group

    Posted 05/03/07 04:56 AM

    Originally posted by: janhess


    Your initial post said that you wanted spaces if it wasn't 1A - 1D. Now you want 1E to be the same as 1A?
    What are your real requirements?
    #IBMSterlingTransformationExtender
    #IBM-Websphere-Transformation-Extender
    #DataExchange


  • 9.  Re: Problem in Using EITHER with choice group

    Posted 05/03/07 05:01 AM

    Originally posted by: deepthideeps


    IF REF(1A-1D) is present in input,that should be displayed in o/p else spaces.

    In the previous case I mentioned,there are 2 REF segments in the input.First one is REF*EI and then REF*1A.

    In that case also I would like to get REF*1A in the output,not spaces.

    Is there any way to do this.

    Thanks,
    Deepthi
    #IBM-Websphere-Transformation-Extender
    #DataExchange
    #IBMSterlingTransformationExtender


  • 10.  Re: Problem in Using EITHER with choice group

    Posted 05/03/07 05:03 AM

    Originally posted by: janhess


    Can you attach some sample data. That might give me a better idea.
    #IBM-Websphere-Transformation-Extender
    #IBMSterlingTransformationExtender
    #DataExchange