IBM webMethods Hybrid Integration

IBM webMethods Hybrid Integration

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
Expand all | Collapse all

How to repeat record in the same row

  • 1.  How to repeat record in the same row

    Posted Thu November 03, 2005 04:27 AM

    We have a requirement to create flat file as per below layout

    a1;a2;a3 are fields of a record which repeats unlimited times in the same row and delimiter is �;�.

    a1;a2;a3;a1;a2;a3;a1;a2;a3;����.; → Layout � a1;a2;a3 repeats unlimited.
    11:12;13;21;22;23;31;32;33;41;42;43; → Sample data

    I could able to repeat above structure line by line (as per mark suggestion).
    But our requirement is to repeat record structure in the same row.

    Any suggestions?

    Regards,
    Shiv


    #Adapters-and-E-Standards
    #Integration-Server-and-ESB
    #webMethods


  • 2.  RE: How to repeat record in the same row

    Posted Thu November 03, 2005 08:31 AM

    Try to use pub.string:tokenize. Feed your record string into the inString parameter and set the delim to an ;. What you’ll end up is a string list in the output pamr valueList.

    You would then create a flow service specific to the data structure that would pick off the fields in sequence. You know that strings occurance 1,4,7,10… are field a1, 2,5,8,11… are a2 and 3,6,9,12… are field a3 and so on.

    If you have a suedo formatted structure like this, you will need additional flow logic to handle it.

    To create the record, use pub.string:makeString and follow a similar path as above.


    #Adapters-and-E-Standards
    #Integration-Server-and-ESB
    #webMethods


  • 3.  RE: How to repeat record in the same row

    Posted Sat November 05, 2005 04:01 AM

    Thanks Ray!!!
    I was thinking in this direction. In my case its outbound i.e. generate flatfile. There are around 150 fields in layout. Luckily above-mentioned structure comes at the end. So first part I planned to use flat file schema and then string logic.

    Thanks again!!!

    Regards,
    Shiv


    #Integration-Server-and-ESB
    #Adapters-and-E-Standards
    #webMethods