IBM Sterling Transformation Extender

Sterling Transformation Extender

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

 View Only
  • 1.  WTX S.O.S.

    Posted Mon May 23, 2016 09:20 AM

    Originally posted by: Veronicadlmm


    Good afternoon, I need help.

     

    I have the following XML

        <RmtInf>

              <Ustrd>xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx</Ustrd>

              <Ustrd>yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy</Ustrd>

              <Ustrd>wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww</Ustrd>

              <Ustrd>11111111111111111111111111111</Ustrd>

              <Ustrd>000000000000000000000000000000000000000000</Ustrd>

        </RmtInf>

     

    I need every 2 fields Ustrd, I concatenate into one line. For example

    001xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy

    002wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww11111111111111111111111111111

     

    I've tried everything: use SERIESTOTEXT(Ustrd) to have everything as a string, CLONE (Ustrd, INDEX($)) and nothing.

     

    Any suggestions and/or help? Thank you.

     


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


  • 2.  Re: WTX S.O.S.

    Posted Mon May 23, 2016 09:35 PM
      |   view attached

    Originally posted by: paul.brett


    Try this example.

    Thank-you

    Paul

    Follow me on Twitter


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

    Attachment(s)

    zip
    Concat2.zip   2 KB 1 version


  • 3.  Re: WTX S.O.S.

    Posted Tue May 24, 2016 02:47 AM

    Originally posted by: paul.brett


    I grouped pairs of rows into an implicit  Group object (where the second component of the pair is defined as optional, to cope with an uneven number of rows):

     

    ....and then looped around for each of these 'pairs'.

    The technique is demonstrated here with a simple Typetree, but may also be applied to an imported Typetree structure (carefully).

    Thank-you

    Paul

    Follow me on Twitter


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


  • 4.  Re: WTX S.O.S.

    Posted Tue May 24, 2016 04:41 AM
      |   view attached

    Originally posted by: Veronicadlmm


    Thank you very much for the example, but my structure I have is this (attach file)

     

    What do I have to add in my structure for me to keep it running? Ustrd(s) is been used in other references that I can not change.


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


  • 5.  Re: WTX S.O.S.

    Posted Tue May 24, 2016 05:13 AM

    Originally posted by: paul.brett


    You could send all the rows to a RUN() map, and use the technique I demonstrated.  I don't know what your doing with the output structure after that, so if it needs mapping, you could wrap the return data in a PARSE() function.

    Thank-you

    Paul

    Follow me on Twitter


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


  • 6.  Re: WTX S.O.S.

    Posted Tue May 24, 2016 06:45 AM

    Originally posted by: Veronicadlmm


    My Input.mtt  has the following structure:

    <RmtInf> (0:1)

          <Ustrd> (s)

     

    Your examples has the following structura:

    <Pair> (s)

        <Ustrd>

        <Ustrd_2> (0:1)

     

    how I can use with my structure for concatenated me every 2 Ustrds?

     

    thank you.


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


  • 7.  Re: WTX S.O.S.

    Posted Tue May 24, 2016 10:05 PM
      |   view attached

    Originally posted by: paul.brett


    OK, here's an alternative approach.

    I read each row and send it to a functional map.  I also send down the INDEX and another complete copy of the input.

    Using compare functions, I can determine if I am working with an 'odd' or 'even' row.  If 'even', I create output, and use the CHOOSE() function to pull out the associated 'odd' row.

    I also need to check to see if the row is odd AND it is the last row, I need to write out that.

    Thank-you

    Paul

    Follow me on Twitter


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

    Attachment(s)

    zip
    Simple.zip   2 KB 1 version


  • 8.  Re: WTX S.O.S.

    Posted Thu May 26, 2016 03:04 AM

    Originally posted by: paul.brett


    Define 'not doing well' and please open a new thread.

    Thank-you

    Paul

    Follow me on Twitter


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


  • 9.  Re: WTX S.O.S.

    Posted Thu May 26, 2016 03:25 AM