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.  Mapping DTM Segments

    Posted 06/08/06 08:46 AM

    Originally posted by: SystemAdmin


    Hi,

    I am trying to map certain DTM segments in a DELJIT(830) file.
    There are mutiple occurences of this DTM and my condition for mapping to field "X" is that if both DTM+A and DTM+B are not present then map DTM+C to "X" .
    So I wrote the following condition
    X=IF(ABSENT(EXTRACT(Date:DTM Segment,MEMBER(DateTimeQual'r :DTM Segment,{"A","B"}))),
    EXTRACT(Date:DTM Segment,DateTimeQual'r :DTM Segment="C"), NONE)

    Somehow the above rule does not work even DTM"A" and DTM"B"
    are present it still populates "X" with DTM"C" .

    When I tried the same rule my hardcoding a value as below.

    X=IF(ABSENT(EXTRACT(Date:DTM Segment,MEMBER(DateTimeQual'r :DTM Segment,{"A","B"}))),"ZZZZZZ", NONE)

    It works fine now it does not populate anything for "X".
    Why does it not work with the above rule and work with the below one.
    Is this a bug? Is there a easier way to accomplish this.

    Any help is greatly appreciated.

    Thanks,
    Sai.
    #IBMSterlingTransformationExtender
    #IBM-Websphere-Transformation-Extender
    #DataExchange


  • 2.  Re: Mapping DTM Segments

    Posted 06/12/06 07:37 AM

    Originally posted by: SystemAdmin


    I'm not familiar with the file formats you mentioned but you might try this.

    code:1:3d8be290bc=IF(
    COUNT(
    EXTRACT(
    Date:DTM Segment
    ,MEMBER(
    DateTimeQual'r :DTM Segment
    ,{"A","B"}
    )
    )
    ) > 0
    ,EXTRACT(
    Date:DTM Segment,DateTimeQual'r :DTM Segment="C"
    )
    , NONE
    )
    [/code:1:3d8be290bc]

    If that doesn't work, then I think I would split up the work being done in the formula. I would create an output card just before this one that would do the count of A/B records and then reference it in this formula's IF clause.

    Hope it helps,
    John
    #IBMSterlingTransformationExtender
    #DataExchange
    #IBM-Websphere-Transformation-Extender