Finding the CCSID values of your data sources
Before you can specify appropriate CCSID values to Db2, you must know the CCSID values that are in effect for all of your data sources. Determining these CCSID values is the first step to preserving data integrity.
About this task
You should know the CCSIDs of all the data that Db2 handles, including all input and output sources, such as the following sources:
- local input and output devices, such as your 3270 terminal emulators and printers
- tape data
- source and data from your application, which are handled by either the Db2 precompiler or a compiler and the Db2 coprocessor
- data from gateway products, such as IBM® MQ, IMS Connect, CICS® Transaction Gateway and any third party products
- FTP data
- Any data from a distributed environment
Procedure
To find the CCSID values of your data sources:
Source | Where find the CCSID in effect |
---|---|
Application data (in host variables or parameter markers) | Look at the value of the ENCODING bind option unless that value was overridden. For more details about how this option could have been overridden, see Specifying a CCSID for your application. |
C/C++ application source code | Look
at the Db2 precompiler or compiler
listing for the CCSID options that were used. For example, the following
listing for the Db2 precompiler
shows that the application uses CCSID 1047:
|
CICS Transaction Gateway | Look at the value of the system initialization parameter CLINTCP. See the following resources: |
COBOL application source code | Look
at the Db2 precompiler or compiler
listing for the CCSID options that were used. For example, the following
listing for the Db2 precompiler
shows that the application uses CCSID 37:
|
FTP | |
IMS | Look at the terminal emulator CCSID. (Follow
the instructions for ISPF or Personal Communications.) IMS uses this CCSID when communicating to Db2 for z/OS®. In IMS Connect, conversion is done by user message exits. Look at those exits for CCSID information. See User exit (EX) ADD command. |
ISPF | Look at the value of the ISPF session variable ZTERMCID under ISPF option 7.3 - variable settings. |
Personal Communications | Look at the Host Code-Page session parameter to find the terminal CCSID. See Configuring Sessions (Personal Communications) |
PL/I application source code | Look
at the Db2 precompiler or compiler
listing for the CCSID options that were used. For example, the following
listing for the Db2 precompiler
shows that the application uses CCSID 37:
|
QMF | Check your Graphical Data Display Manager (GDDM) code page setting, because QMF uses GDDM to do the display. You can check your GDDM code page setting by looking at the APPCPG parameter, which can be set in
one of the following two places:
Recommendation: For QMF, set the APPCPG parameter to match the CCSID
that is used by Db2 and your terminal
emulator.
|
Queue Managers in IBM MQ | Follow the instructions for viewing and setting the Queue Manager CCSID in Data Conversion under IBM MQ. You can also check individual MQGET and MQPUT statements. These statements can override the MQ CCSID setting by specifying a CCSID in the statement. |
TSO | Perform one of the following actions:
|
z/OS DFSMS SMS (the file system) | CCSID is an attribute of SMS-managed data sets. For more information about how that CCSID is set, see Data Conversion for z/OS Distributed FileManager or Converting data for z/OS Network File System or search the CCSID file tagging information in z/OS UNIX System Services Command Reference. However, the access methods (VSAM, BSAM/QSAM, BPAM, etc) for these data sets do not have support to perform conversions. Only DFM supports conversions between CCSIDs for DASD data sets. The CCSID value also can be used when reading or writing magnetic tapes that have ISO/ANSI tape labels. You can code the CCSID keyword on the DD statement or supply it in the data class. You can also supply the CCSID value on the JOB or STEP JCL statement. For more information, see Character Data Conversion. |