Field mapping rules

File Manager uses the rules shown in Field mapping rules to determine if a given “from” field can be mapped to a given “to” field. “Yes” indicates that the mapping is valid. “No” indicates that the mapping is invalid.
Table 1. Field mapping rules

This table has four columns. In the header, the '"To" field" header spans three columns, with subheadings "Alphanumeric", "Numeric" and "Floating-point". The last row of the table, "Note:" spans all four columns.

“From” field“To” field
Alphanumeric NumericFloating-point
Alphanumeric1YesYes2Yes3
Numeric integer4YesYes Yes
Numeric non-integer5 NoYesYes
Floating-point6NoYes Yes
These rules describe how a validly mapped “from” field is moved to a “to” field. When the “to” field is:
Alphanumeric
The data is aligned at the leftmost character position and, if necessary, truncated or padded with spaces at the right. The COBOL JUSTIFIED clause, if specified, is ignored.

If the “from” field is a numeric field, the absolute (unsigned) value is used. If the field is defined as signed and the sign occupies a separate character, that character is not moved, and the sending item is considered to be one less character than the actual size.

Numeric
The data is aligned on the assumed decimal point and, if necessary, truncated or padded with zeros. If an assumed decimal point is not explicitly specified in the field definition, one is assumed immediately to the right of the field.

For a negative number when the “from” field is signed numeric, the data is moved as if both the “from” field and “to” field were described as signed.

When the “from” field is alphanumeric, the data is moved as if the “from” field were described as a signed numeric.

Internal Floating-Point
A decimal point is assumed immediately to the left of the field. The data is aligned then on the leftmost digit position following the decimal point, with the exponent adjusted accordingly.
External Floating-Point
The data is aligned on the leftmost digit position, and the exponent adjusted accordingly.
1 The category “alphanumeric” includes the COBOL categories: alphabetic, alphanumeric, alphanumeric-edited, numeric-edited, and DBCS. PICTURE clause editing characters are ignored. Group fields are treated as elementary alphanumeric fields.
2 The “from” field must consist only of numeric characters, and is treated as a numeric field.
3 The “from” field must consist only of numeric characters, and is treated as a numeric field.
4 The category “numeric integer” includes the following COBOL data types: binary (comp or comp-4 items), packed decimal (comp-3 items), and zoned decimal (PIC 9(n) items). The decimal items cannot have an implied decimal point.
5 The category “numeric non-integer” includes packed and zoned decimal items with an implied decimal point and one or more decimal digits.
6 The category “floating point” includes the COBOL floating point data types (comp-1 or comp-2 items). These are representations of real numbers stored with a mantissa and exponent.