Map fixed-length fields to variable-length fields
You can use FMTOPT(*MAP) to map fixed-length fields to variable-length fields.
If the to-field has a maximum length greater than or equal to the from-field length, the from-field data is copied to the data portion of the to-field and padded to the right with single-byte blanks. The to-field length is set to the length of the from-field length.
If the length of the from-field is greater than the maximum length of the variable-length to-field, the length portion of the variable-length to-field is set to the maximum length of the variable-length to-field. The data from the fixed-length from-field is copied to the data portion of the variable-length to-field and truncated on the right in a way that ensures data integrity.
Parent topic:
Specifying data for different field types and attributes