CPYFRMQRYF command support for CCSIDs
The Copy from Query File (CPYFRMQRYF) command provides coded character set identifier (CCSID) conversions for character and double-byte character sets (DBCS) fields.
The Open Query File (OPNQRYF) command converts all character and DBCS fields to the current job CCSID, except for fields that have a CCSID of 65535 or where *HEX is specified on the MAPFLD parameter. If the current job CCSID is 65535, then no conversions are done by OPNQRYF. The Copy from Query File (CPYFRMQRYF) command can also do conversions to the to-file field CCSIDs, so it is possible that double conversions will be done and data might be lost. To avoid the possibility of doing double conversions, change the job CCSID to 65535 before doing an OPNQRYF if you plan to do a CPYFRMQRYF. CPYFRMQRYF uses a different query format. It is the same as the open query file format except for the CCSIDs for character and DBCS fields. The CCSIDs in this query format are determined according to the following conditions:
- If the OPNQRYF job CCSID is 65535, all character and DBCS fields in the query format have the same CCSIDs as the open query file format.
- If the OPNQRYF job CCSID is not 65535, all character and DBCS fields in the query format have their CCSIDs reset to the associated single-byte, mixed or double-byte CCSIDs of the OPNQRYF job CCSID, based on the field type. Fields with a CCSID of 65535 remain unchanged. If there is no associated mixed or double-byte CCSID for the OPNQRYF job CCSID, 65535 is used.
Parent topic:
Copying files: Basic functions
Related information
Working with CCSIDs