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

URGENT! Parsing a Fixed length flat file

  • 1.  URGENT! Parsing a Fixed length flat file

    Posted Tue April 16, 2002 11:30 AM

    I am trying to parse a fixed length flat. I have created the appropriate template (by defining the
    template in a xml file, adhering to all the requirements for templates).
    However when I parse the flat file I get the following error

    java.lang.NullPointerException
    at wm.b2b.edi.EDIConverter.getSegment(EDIConverter.java:657)
    at wm.b2b.edi.EDIConverter.createLoop(EDIConverter.java:478)
    at wm.b2b.edi.EDIConverter.toEDIValues(EDIConverter.java:375)
    at wm.b2b.edi.convertToValues(edi.java:667)

    The source flat file does not have any repeating segments, in fact there is just one record/segment. I have crossed checked the specification of my template I do not see any errors. Is it necessary to have repeating segments in the flat file?

    Your advice is appreciated.

    thanks


    #webMethods
    #webMethods-General
    #Integration-Server-and-ESB


  • 2.  RE: URGENT! Parsing a Fixed length flat file

    Posted Fri April 19, 2002 09:10 AM

    I have one suggestion, although this is documented in b2bediusersguide.pdf. So you might as well have this in your template already.
    You do need at least two segments and two loops defined in any EDI template for the parser to work (without this your segment and loop are records in stead of recordlist elements, and the parser program can not resolve indexed references). When you have just one segment, you need a dummy segment and loop.

    Your template should look like this:

    … //your segment definition

    //dummy segment definition

    ... //your loop definition //dummy loop

    I hope this works for you.
    Huub


    #webMethods-General
    #webMethods
    #Integration-Server-and-ESB