webMethods

webMethods

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

Flatfile issue - Empty trailing fields are created

  • 1.  Flatfile issue - Empty trailing fields are created

    Posted Mon April 16, 2007 08:47 AM

    Hi,

    My flatfile situation looks like this:

    Flat file definition = Delimiter (Carriage return line feed)
    Record definition: Contains fixed position fields where the last 10 is not mandatory.

    The expected output when the none-mandatory fields are not mapped is the record should end at the last filled out field and not fill out the trailing fields with blanks.

    The behaviour I describe was working before the IS_6-5_SP1 was applied on our environments.

    Now not use fields are filled out with blanks creating a record with trailing spaces. Perhaps this is a wanted behaviour, motivating the change from wM, but now I need to find another way of handling the empty fields.

    I am not an experienced in the flat file area, so any suggestions in how to solve my problem is appreciated.

    Eric

    Ps. The attached package can be used to test this problem I have
    TestFlatFile.zip (32.9 KB)


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


  • 2.  RE: Flatfile issue - Empty trailing fields are created

    Posted Wed April 18, 2007 02:41 PM

    Can you try trimming your records?? That should remove the blanks spaces.

    But this will also remove any leading blank spaces as well.

    Instead you can put a complex logic like:

    1. get index of blank space.
    2. Substring the value from position 0 to (value recd from #1 minus 1).

    HTH

    -Malhar


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


  • 3.  RE: Flatfile issue - Empty trailing fields are created

    Posted Wed April 18, 2007 03:51 PM

    The problem is that convertToString is the final step in our general flatfile process, i.e. I can only change the flatfile schema and dictionary in order to change the format of the output flatfile.

    /Eric


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