When you want to output to a fixed-width flat file based on a flat file target definition, you must configure precision and field width for the target field to accommodate the total length of the target field. If the data for a target field is too long for the total length of the field, the Integration Service performs one of the following actions:
Truncates the row for string columns
Writes the row to the reject file for numeric and datetime columns
When the Integration Service writes a row to the reject file, it writes a message in the session log.
When a session writes to a fixed-width flat file based on a fixed-width flat file target definition in the mapping, the Integration Service defines the total length of a field by the precision or field width defined in the target.
Fixed-width files are byte-oriented, which means the total length of a field is measured in bytes.
The following table describes how the Integration Service measures the total field length for fields in a fixed-width flat file target definition:
Target Field Property That Determines Total Field Length
The following table lists the characters you must accommodate when you configure the precision or field width for flat file target definitions to accommodate the total length of the target field:
Characters to Accommodate
Negative sign (-) for the mantissa.
Shift-in and shift-out characters.
Date and time separators, such as slashes (/), dashes (-), and colons (:).
For example, the format
has a total length of 26 bytes.
When you edit the flat file target definition in the mapping, define the precision or field width great enough to accommodate both the target data and the characters in the preceding table.
For example, suppose you have a mapping with a fixed-width flat file target definition. The target definition contains a number column with a precision of 10 and a scale of 2. You use a comma as the decimal separator and a period as the thousands separator. You know some rows of data might have a negative value. Based on this information, you know the longest possible number is formatted with the following format:
Open the flat file target definition in the mapping and define the field width for this number column as a minimum of 14 bytes.