Specify data for different field types and attributes

You can use FMTOPT(*MAP) to map data between fixed-length and variable-length fields and between variable-length fields with different maximum lengths.

When mapping a variable-length field with a length of zero to a variable-length to-field, the to-field length is set to zero.

When mapping a variable-length field with a length of zero to a fixed-length to-field, the to-field is filled with single-byte blanks (X'40'), unless the to-field is a DBCS-only field. A DBCS-only to-field is set to X'4040's and surrounded by shift-out and shift-in (SO-SI) characters.

When mapping variable-length fields to variable-length fields and the from-field does not have a length of zero and graphic fields are not being mapped to or from bracketed DBCS fields, the following action happens:

Note: In the examples, x represents a blank, < represents the shift-out character, and > represents the shift-in character. The 2-byte length is actually a binary number shown as a character to make the example readable.

Example of mapping from and
to variable-length fields