CCSID considerations for SQL

If you are running a distributed application and one of your systems is not a System i® product, the server on the System i platform cannot have the job coded character set identifier (CCSID) value set to 65535.

Before requesting that the remote system create an SQL package, the application requester always converts the name specified on the RDB parameter, the SQL package name, the library name, and the text of the SQL package from the CCSID of the job to CCSID 500. This is required by Distributed Relational Database Architecture™ (DRDA). When the remote system is a System i product, the names are not converted from CCSID 500 to the job CCSID.

It is recommended that delimited identifiers not be used for table, view, index, schema, library, or SQL package names. Conversion of names does not occur between systems with different CCSIDs. Consider the following example with system A running with a CCSID of 37 and system B running with a CCSID of 500.

  • Create a program that creates a table with the name "a¬b|c" on system A.
  • Save program "a¬b|c" on system A, then restore it to system B.
  • The code point for ¬ in CCSID 37 is x'5F' while in CCSID 500 it is x'BA'.
  • On system B the name displays "a[b]c". If you created a program that referenced the table whose name was "a¬b|c.", the program will not find the table.

The at sign (@), pound sign (#), and dollar sign ($) characters should not be used in SQL object names. Their code points depend on the CCSID used. If you use delimited names or the three national extenders, the name resolution functions may possibly fail in a future release.