Flat file parser concepts

Flat file parser is a module used to break up a document into separate components. Parsed documents are attached to tags that define each component, including the component's function and format. Flat file parser is the component in EC that performs the actual transformation between flat and XML files using a defined record structure for the message. The detailed information about how the data is organized within the file and any relationships to other data items within the file is contained in a flat file definition.

In addition to the message structure, fields are managed in flat file parser based on your specified values in these metadata.

Metadata Description
Padding A field length is fixed; otherwise, you need a padding to have the same length for the input and the output field. For example, in a field with fixed seven digits where only three digits are used, you need a padding to fill up the four digits gap.
Alignment Location of the padding characters’ placement relative to the padded information.
White Space Trim Removal of all formatting directives surrounding a string of characters, such as tabs, line feeds, and blanks.
Empty Value Define a value to use on a field with empty value. This is signaled using a special string of information that is inserted by the parser.
Record Separators Commonly used characters as standard end of line separators.

This table shoes a list of commonly used characters as end of line record separators:

Platform Description In Java In EC Hex values
PC [return][linefeed] [\r][\n] [\r][\n] [0D][0A]
UNIX [line feed] [\n] [\n] [0A]
Mac [return] [\r] [\r] [0D]

You specify the flat file message encoding in the Partner Administration tool. The encoding is not part of the flat file definition. You can use the same flat file definition for flat files that have the same structure but are encoded differently.


When you import to, or export from, the Flat File Repository, the flat file definitions are always encoded in Java Encoding (UTF-16).