This example shows the use of the coded character set identifiers (CCSIDs) when you run the Open Query File (OPNQRYF) command to select records.
OPNQRYF FILE(FILEA FILEB) FORMAT(RESULTF) + JFLD((FILEA/NAME FILEB/CUSTOMER))
If field NAME has a CCSID of 37 and field CUSTOMER has a CCSID of 273, the mapping of either NAME or CUSTOMER is performed during processing of the OPNQRYF command so that the join of the two fields provides a meaningful result.
Normally, constants defined in the MAPFLD, QRYSLT, and GRPSLT parameters are tagged with the CCSID defined to the current job. This suggests that when two users with different job CCSIDs run the same OPNQRYF command (or a program containing an OPNQRYF command) and the OPNQRYF command has constants defined in it, the users can get different results because the CCSID tagged to the constants might cause the constants to be treated differently.
OPNQRYF FILE(FILEA) FORMAT(RESULTF) QRYSLT('NAME *EQ MAP1') + MAPFLD((MAP1 '"Smith"' *CHAR 5 *N 37))
OPNQRYF FILE(FILEA) FORMAT(RESULTF) QRYSLT('NAME *EQ "Smith"')The results of the query might differ, depending on the job CCSID of the user issuing the OPNQRYF command.