Debugging CCSID and Unicode problems

Some errors are obviously a problem with a CCSID or Unicode object. In other cases, DB2® returns unexpected data and you need to check if a CCSID is the cause of the problem. In these cases, you might not be using Unicode data or doing anything with CCSIDs other than accepting the default values.

Procedure

To debug CCSID and Unicode problems:

Consider the symptoms and possible solutions as shown in the following table:
Table 1. Possible solutions to Unicode and CCSID problems
Symptom Possible solution
A single character is displayed incorrectly. A CCSID is probably set incorrectly somewhere. Check the following settings:

Also try displaying the character in hexadecimal format to see if you can determine what encoding the character is in. Knowing the encoding can also help IBM Software Support, if you need to contact them.

A conversion that you need is not defined in z/OS Unicode Services. You might have received SQLCODE 332 or message DSNT552I. Add the missing conversion definition. See Setting up z/OS Unicode Services for DB2 for z/OS.
Lowercase special characters do not become uppercase. Ensure that you are specifying the correct locale. See Performing culturally correct case conversions.
An insert operation of EBCDIC or ASCII data into a Unicode table fails. Ensure that the column size is large enough to handle any possible data expansion. See Potential problems when inserting non-Unicode data into a Unicode table.
Object names are unreadable in DB2 utility listings Make sure that the values that are set in DSNHMCID match those values in DSNHDECP.

CCSID settings in DSNHMCID are used for certain messages. DSNHMCID settings need to match those same settings in the DSNHDECP load module that the DB2 subsystem is using. For more information about DSNHMCID, see Start of changeJob DSNTIJUZ and the subsystem parameter load module, application defaults load module, and DSNHMCIDEnd of change.