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

Defining a complex flat file schema

  • 1.  Defining a complex flat file schema

    Posted Fri September 09, 2005 09:27 PM

    I have a FIXED-LENGTH file that looks like this:

    • Header line (length=17, occurs=1 time, record id=first 3 chars are HDR)
    • Order Header line (length=457, occurs=n times, record id=first 3 chars are 000)
    • Order Item line (length=181, occurs=n times for each Order Header line, record id=none)
    • Trailer line (length=14, occurs=1 time, record id=first 3 chars are TLR)

    Is it possible to design a Flat File Schema for this type of complex structure?

    Thanks,
    Percio


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


  • 2.  RE: Defining a complex flat file schema

    Posted Mon September 12, 2005 09:01 AM

    It is very much possible.

    Create a flat file dictionary with the following definitions.

    Header
    OrdHdr
    OrdLin
    Trailer

    Choose the Delimiter Record Parser.
    Create a Record reference to Header (Occurs 1) and name it HDR
    Create a sub Record Reference to OrdHdr(Occurs unlimited) and name it 000
    Create a sub record Reference to OrdLin(Occurs unlimited) and name it recordWithNoID
    Create a Record Refernce below the HDR to Trailer (occurs 1) and name it TLR

    Also in the Settings tab, set the Default Record to OrdLin refering to the above dictionary.

    That should work !!!
    HTH
    Bhavani Shankar


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


  • 3.  RE: Defining a complex flat file schema

    Posted Mon September 12, 2005 03:05 PM

    Bhavani,

    Thanks for the response. However, my problem is that the file is not delimited, it’s fixed-length, and as you saw in my original post, each type of record in the file has a different length.

    I was able to make it work by doing pretty much the same thing you explained and by padding each line in the file to 457 characters before parsing. I would like, however, not to have to do the padding.

    Thanks,
    Percio


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