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

Flat file parsing delimiter part of data

  • 1.  Flat file parsing delimiter part of data

    Posted Tue September 26, 2006 12:01 AM

    I have a flat file that i need to parse. The flat file is a pipe i.e. “|” delimited file.
    So i have set up the flat file schema accordingly to parse the file.
    The problem is when the character that is used as the delimiter appears as part of the data , how to handle this.
    Example:

    The following is 2 records in a flat file
    tom1|1254,Convent Rd1|Pittsburgh|PA
    tom2|1255,Convent Rd2|Harrisburgh|PA
    The above file is parsed correctly.

    But what happens if the name in the above file had a pipe(which is the delimiter) i.e. had “tom|” instead of tom1 in which case the file would look as

    tom||1254,Convent Rd1|Pittsburgh|PA
    tom2|1255,Convent Rd2|Harrisburgh|PA
    So how to handle the above file?

    Thanks,
    sreddy


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


  • 2.  RE: Flat file parsing delimiter part of data

    Posted Tue September 26, 2006 01:55 AM

    If you have this situation then the data goes into the undefData when you parse the flatfile (convertToValues)…since there are no enough field definitions in plac according to FFSchema incase of your example —tom||

    Some how you should not get the pipe in the data,so talk to the source file appteam and discuss this limitation with them mutual agreement should solve your issue.

    HTH,
    RMG


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


  • 3.  RE: Flat file parsing delimiter part of data

    Posted Thu October 04, 2007 02:56 PM

    I agree with RMG, you need to agree with whoever creates your input file and non-allowed characters. In your case they can’t use your delimeter, because otherwise your process will get confused. You can try alternative characters, a fixed length file, or perhaps an XML type.


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