Skip Trailing Blanks of Fixed Length Files in #Informatica

Just stumbled over the problem how to successfully skip trailing blanks in my fixed length flat file and how to have a CR/LF line feed instead of the UNIX one.

As a rookie in Informatica, I naturally opened my flat file definition in the PowerCenter Designer and configured the flat file properly using Advanced Options:

After selecting the Advanced button on the lower right corner, the following dialog appears where you can set the configuration:

However, this setting has no effect when you run the workflow. It only has effect to the PowerCenter Designer functionality, such as previewing data.

To enable the settings in the workflow, you have to configure the flat file in the session.

  1. Open the session to be configured
  2. Go to the Mapping tab
  3. Select the source from the Sources tree on the left of the dialog
  4. Select the link Set File Properties (see screenshot)

The following dialog appears:

Make sure that you have selected the correct instance on the left and select the Advanced button. The following dialog appears:

This dialog looks familiar to the dialog in PowerCenter Designer. Configure it properly (e.g. Number of bytes to skip between records to 2 for Windows / DOS files and to 1 for UNIX files).

2 thoughts on “Skip Trailing Blanks of Fixed Length Files in #Informatica

  1. Thank you. Thank you so very much. I don’t usually work with flat files and had no idea how to deal with trailing spaces before I read your article.

Leave a Reply

Your email address will not be published. Required fields are marked *