Flatfile issue - Empty trailing fields are created

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)

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

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