IBM Sterling Transformation Extender

Sterling Transformation Extender

Come for answers, stay for best practices. All we're missing is you.


#Sterling
 View Only
  • 1.  ITX9.0 EXTRACT

    Posted Tue December 19, 2017 05:58 AM

    Originally posted by: Ristonen


    Hi

    I have an ITX9.0 map, where input is a Cobol file like

    01 ROW.

        05 MESSAGE OCCURS 10 TIMES.

            10 MSG-CODE1   PIC X(2).

            10 MSG-CODE2   PIC X(2).

            10 MSG-TXT     PIC X(35).

     

    Output is a XML text field, max-size 70 characters.

     

    The idea is to move 1 or 2 MSG-TXT fields to XML-field.

     

    If there is a field, that has

    MSG-CODE1(ind) = '70' and MSG-CODE2(ind) ='S1'

    then we move MSG-TXT(ind) to XML-NAME    

     

    If there is also a field, that has

    MSG-CODE1(ind) = '70' and MSG-CODE2(ind) ='S2'

    then we add MSG-TXT(ind) to existing XML-NAME.

     

    I have now a sentence:

    =F1_Nm(EXTRACT(MESSAGE,(MSG-CODE1="70" & MSG-CODE1="S1")| (MSG-CODE1="70" & MSG-CODE1="S2")))

     

    And in F1_Nm

    =Out+ MSG-TXT

     

    After this sentence in the output there is only the first MSG-TXT.

     

    Example:

    MSG-CODE1(1) = '70' and MSG-CODE2(1) ='S1' MSG-TEXT(1)='Name1'

    MSG-CODE1(1) = '70' and MSG-CODE2(1) ='S2' MSG-TEXT(1)='Name2'

    => in the output there is only 'Name1'.

    It should be 'Name1Name2'

     

    I suppose this has worked in wtx8.2, but I am not sure.

     

    Have you any idea how I should resolve this? 

     

    Regards Risto


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


  • 2.  Re: ITX9.0 EXTRACT

    Posted Wed December 20, 2017 05:24 AM
      |   view attached

    Originally posted by: PaulBrett


    Perhaps you need to put a SERIESTOTEXT() function in there?  It's hard to tell when you have not attached your testcase.

    Please see my mock-up examples.

    Test1 output = Oranges

    Test2 output = OrangesApplesPlums

    Thank you.

    Paul

    Follow me on Twitter


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

    Attachment(s)

    zip
    Extract.zip   3 KB 1 version


  • 3.  Re: ITX9.0 EXTRACT

    Posted Thu January 04, 2018 01:54 AM

    Originally posted by: Ristonen


    
    
    Thank you for your answer, 
    
    it really led me to the right solution!
    

     

    First, I must correct some error in my example. On the second row the index must be 2:

    MSG-CODE1(1) = '70' and MSG-CODE2(1) ='S1' MSG-TXT(1)='Name1'

    MSG-CODE1(2) = '70' and MSG-CODE2(2) ='S2' MSG-TXT(2)='Name2'

     

    And the table was:

     

    01 ROW.

        05 MESSAGE OCCURS 10 TIMES.

            10 MSG-CODE1   PIC X(2).

            10 MSG-CODE2   PIC X(2).

            10 MSG-TXT     PIC X(35).

     

    In my final solution I just replace the Functional map with SeriesToText

    = SeriesToText(EXTRACT(MSG-TXT,(MSG-CODE1="70" & MSG-CODE1="S1")| (MSG-CODE1="70" & MSG-CODE1="S2")))

     

    Now I get from the table: Name1Name2.

    And that's right.

     

    Thank you.

    Risto

     


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


  • 4.  Re: ITX9.0 EXTRACT

    Posted Fri February 02, 2018 05:58 AM

    Originally posted by: Vino685


    Hi Risto,

    Could you please provide the IBM PMR id if raised for this issue ..

     

    Thanks,

    Vinoth


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


  • 5.  Re: ITX9.0 EXTRACT

    Posted Mon February 05, 2018 01:17 AM

    Originally posted by: Ristonen


    Hi Vinoth,

    There is not any PMR for my question

    Regards Risto


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