Different CCSIDs used by record keys (FROMKEY and TOKEY)
When you use the number of key fields and a value to specify the FROMKEY or TOKEY parameter, the copy command does not make any CCSID conversions to the input string.
When *BLDKEY is specified on the FROMKEY or TOKEY for character, DBCS-open, DBCS-either, or DBCS-only fields, the value specified is assumed to be in the CCSID of the process in which the copy command is running. The copy command converts each of these key values from the job CCSID to the CCSID of the from-file key field. If no conversion table is defined or an error occurs while converting the input key value, a message is sent and the copy operation ends. If the value can be correctly converted, the converted value is used to build the key value that determines the first and last record to be copied.
Parent topic:
Selecting records by record keys (FROMKEY and TOKEY parameters)