CCSID conversion considerations for DB2 for z/OS and DB2 Server for VM database managers
One of the differences between a Db2 for i and other DB2® databases is that the IBM i operating system supports a larger set of CCSIDs. This can lead to errors when the other database managers attempt to perform character conversion on the data (SQLCODE –332 and SQLSTATE 57017).
Certain fields in the DB2 SQL catalog tables might be defined to have a DBCS-open data type. This is a data type that allows both double-byte character set (DBCS) and single-byte character set (SBCS) characters. The CCSID for these field types is based on the default CCSID.
When these fields are selected from a DB2 for z/OS® or DB2 Server for VM application requester (AR), the SELECT statement might fail because the DB2 for z/OS and DB2 Server for VM databases might not support the conversion to this CCSID.
To avoid this error, you must change the DB2 for z/OS database or the DB2 Server for VM AR to run with either one of the following items:
- The same mixed-byte CCSID as the DBCS-OPEN fields in the IBM i SQL catalog tables.
- A CCSID that the server allows conversion of data to when the data is from the mixed-byte CCSID of the DBCS-OPEN fields in the IBM i SQL catalog tables. This CCSID might be a single-byte CCSID if the data in the IBM i SQL catalog tables DBCS-OPEN fields is all single-byte data.
You need to analyze the CCSID conversions supported on the DB2 for z/OS or DB2 Server for VM to make the correct changes to your system. See the DB2 UDB for z/OS Administration Guide for specific information about how to handle this error.