Every application server and application requester has
a default CCSID (or default CCSIDs in installations that support DBCS
data).
The CCSID of the following types of strings is determined at the
current server:
- String constants (including string constants that represent datetime
values) when the CCSID of the source is in a foreign encoding scheme
- Special registers with string values (such as USER and CURRENT
SERVER)
- CAST specifications where the result is a character or graphic
string
- Results of CHAR, DATAPARTITIONNAME, DAYNAME, DBPARTITIONNAME,
DIGITS, HEX, MONTHNAME, SOUNDEX, SPACE, and VARCHAR_FORMAT scalar
functions
- Results of DECRYPT_CHAR, DECRYPT_DB, CHAR, GRAPHIC, VARCHAR, and
VARGRAPHIC scalar functions when a CCSID is not specified as an argument
- Results of the CLOB and DBCLOB scalar functions when a CCSID is
not specified as an argument1
- String columns defined by the CREATE TABLE or ALTER TABLE statements
when an explicit CCSID is not specified for the column1
- String columns defined by the DECLARE GLOBAL TEMPORARY TABLE statement
when an explicit CCSID is not specified for the column1
- Distinct types when the source type is a character or graphic
string type
- String parameters defined by CREATE FUNCTION or CREATE PROCEDURE
statements when an explicit CCSID is not specified for the parameter 1
If one of the types of strings above is used in a CREATE VIEW statement,
the default CCSID is determined at the time the view is created.
In a distributed application, the default CCSID of variables is
determined by the application requester. In a non-distributed application,
the default CCSID of variables is determined by the application server.
On the IBM® i operating
system, the default CCSID is determined by the CCSID job attribute.
For more information about CCSIDs, see the Work with CCSIDs topic
in the Globalization topic collection.
1 If the default CCSID is 65535, the
CCSID used will be the value of the DFTCCSID job attribute (or an
associated CCSID of the DFTCCSID). If there is no associated mixed
data CCSID,
- the CCSID used when FOR MIXED DATA is specified will be 65535,
- the CCSID for GRAPHIC and VARGRAPHIC will be 65535, and
- the CCSID for DBCLOB will be 1200.