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.  Substring and Size

    Posted 04/15/16 01:14 PM

    Originally posted by: SJacob


    Hi, I have a scenario, where I have to Add sizes of 3 data fields and based on the size I have to make a logical decision.

    Example:

    INData1: "abcdef ghijk"  --> Total lengt of 12.

    INData2: "12345 67890"  --> Total length of 11.

    INData3: "klmn opq rst" --> Total length of 12.

    OUTData: Total length of 30.

    What I want to do is , if total length of INData1(5:7)+INData(1:7)+INData3(1:3) is Greater than 15, I have to map those sub fields , ie ( INData1(5:7)+INData(1:7)+INData3(1:3) ) to OUTData.ELSE map just (INData1(5:7)+INData(1:7)+) to OUTData.

     

    Any guidance is greately appreciated.

    Warm Regards,

    Sjacob

     

     


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


  • 2.  Re: Substring and Size

    Posted 04/15/16 02:35 PM

    Originally posted by: paul.brett


    Can you explain what you mean by INData1(5:7).  This is not a standard WTX notation.  Do you mean characters 5 to 7 inclusive?  Or iterations 5 to 7, where INData1 is a repeating object?

    Thank-you.

    Paul.

    Follow me on Twitter


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


  • 3.  Re: Substring and Size

    Posted 04/15/16 05:56 PM

    Originally posted by: SJacob


    Sorry Paul, I was not clear earliar.

    INData(5:7) meaning, in the data field INData starting position 5, length of 7.

     

    Like,

    If Length of ( INData1(5:7)+INData(1:7)+INData3(1:3) ) > 15, then Map  all the fields , ie ( INData1(5:7)+INData(1:7)+INData3(1:3) ) to OUTData.

    Hope I am making sense.

     

    Thank You.


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


  • 4.  Re: Substring and Size

    Posted 04/16/16 02:14 AM

    Originally posted by: paul.brett


    A combination of SIZE() on some MID() results with perhaps some TRIMRIGHT() functions should do it:

    = IF(SIZE(TRIMRIGHT(MID(INData1,5,3)))+SIZE(TRIMRIGHT(MID(INData2,1,8))).....   etc   >15 ,  mapping if true , mapping if false)

    Thank-you.

    Paul.

    Follow me on Twitter


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