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
  • 1.  Appending trailer record

    Posted Tue February 03, 2004 07:36 PM

    Hi!

    I have an input as a list of detail records. At the output side, i need to send the list of detail records along with a trailer record having the summation of the detail record for some fields.

    May i know what is the best possible way to handle such a scenario.

    -Jan


    #Integration-Server-and-ESB
    #Flow-and-Java-services
    #webMethods


  • 2.  RE: Appending trailer record

    Posted Tue February 03, 2004 07:44 PM

    I would like to add to the above post. All the transmission is in a flat file format.


    #Integration-Server-and-ESB
    #Flow-and-Java-services
    #webMethods


  • 3.  RE: Appending trailer record

    Posted Wed February 04, 2004 02:09 PM

    JanLynch,

     Create a Structure for out put record, loop through your input detailed record list and use recordList size built in function to get sum of detailed record and map to output record structure. Create a flat file schema for the output record and use convert to string built-in service to generate flat file structure
    

    #Integration-Server-and-ESB
    #webMethods
    #Flow-and-Java-services


  • 4.  RE: Appending trailer record

    Posted Wed February 04, 2004 03:47 PM

    Hi! KK,

    thanx for ur input. The sample input file for me is like,

    001 ABC
    001 024 456 010
    001 324 434 025
    001 724 456 015
    002 DEF
    002 024 456 010
    002 324 434 010

    Now, my output requires, the following,
    001 024 456 010
    001 324 434 025
    001 724 456 015

    • 050
      002 024 456 010
      002 324 434 010
    • 020

    The Header record is not needed in the output. The trailer record in the output is the summation of the 4th column in the detail record. In the output we need the Detail Records and after each set of detail records we need a trailer record with the total. 1st column is the serail no.

    Now, to get the trailer record after each set of detail record, which is the best possible way.

    I am defining the fields in the flat file schema. I donot have any seperate header record. I segregate with the record length, as the header record length is small than the detail. The length for header and detail records are fixed.


    #Flow-and-Java-services
    #webMethods
    #Integration-Server-and-ESB