You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
Table 13. Database-to-Database Copy Operations (continued)<br />
FMTOPT<br />
Parameter<br />
Values<br />
(see note<br />
4)<br />
ALL Field Names in<br />
From-and To-<strong>File</strong>s Are<br />
the Same (like-named)<br />
Database <strong>File</strong> Record Formats<br />
SOME Field Names in<br />
From-and To-<strong>File</strong>s Are<br />
the Same<br />
NO Field Names in Either <strong>File</strong> Are the Same<br />
Notes:<br />
1. Field attributes include the data type (character, zoned, packed, binary or floating point), field length, decimal<br />
position (for numeric fields), date or time format (for date or time fields), null capability, CCSID, and whether<br />
the field has variable length or fixed length.<br />
2. Mapping consists of converting the data in a from-file field to the attributes of the corresponding (like-named)<br />
to-file field. If the attributes of any corresponding fields are such that the data cannot be converted, the copy is<br />
ended.<br />
3. The records are padded or truncated as necessary. Data in the from-file may not match the to-file record format.<br />
4. Any other value specified for the FMTOPT parameter is ignored when the *CVTFLOAT value or the<br />
*NULLFLAGS value is specified (except the *CVTFLOAT and *NULLFLAGS values).<br />
Specifying data for different field types and attributes<br />
Variable-length fields using FMTOPT(*MAP)<br />
FMTOPT(*MAP) can be used to map data between fixed- and variable-length fields<br />
and between variable-length fields with different maximum lengths.<br />
When mapping a variable-length field with a length of zero to a:<br />
v variable-length to-field, the to-field length is set to zero.<br />
v fixed-length to-field, the to-field is filled with single-byte blanks (X'40'), unless<br />
the to-field is a DBCS-only field. A DBCS-only to-field is set to X'4040's and<br />
surrounded by shift-out and shift-in (SO-SI) characters.<br />
The following applies when the from-field does not have a length of zero and<br />
graphic fields are not being mapped to or from bracketed DBCS fields.<br />
Mapping variable-length fields to variable-length fields<br />
The length of a variable-length from-field is copied to a variable-length to-field<br />
when the from-field data length is less than or equal to the maximum length of the<br />
to-field. If the from-field data length is greater than the maximum length of the<br />
to-field, the data of the from-field is truncated to the maximum length of the<br />
to-field, and the to-field length is set to the maximum length. The data is truncated<br />
in a manner that ensures data integrity.<br />
Note: In the examples, x represents a blank, < represents the shift-out character,<br />
and > represents the shift-in character. The 2-byte length is actually a binary<br />
number shown as a character to make the example readable.<br />
Chapter 4. Copying files 109