A graphic-string constant is a varying-length graphic string. The length of the specified string cannot be greater than 16370. The three forms of DBCS graphic-string constants are:
In the normal form, the SQL delimiters and the G or the N are SBCS characters. The SBCS ' is the EBCDIC apostrophe, X'7D'.
In the PL/I form, the apostrophes and the G are DBCS characters. Two consecutive DBCS string delimiters are used to represent one string delimiter within the string. Note that this PL/I form is only valid for static statements embedded in PL/I programs.
A hexadecimal DBCS graphic constant is also supported. The form of the hexadecimal DBCS graphic constant is:
GX'ssss'
In the constant, ssss represents a string from 0 to 32760 hexadecimal digits. The number of characters between the string delimiters must be an even multiple of 4. Blanks between the string delimiters are ignored. Each group of 4 digits represents a single DBCS graphic character. The hexadecimal for shift-in and shift-out ('0E'X and '0F'X) are not included in the string.
The CCSID assigned to constants is the DBCS CCSID associated with the CCSID of the source unless the source is encoded in a foreign encoding scheme (such as ASCII). In this case, the CCSID assigned to the constant is the DBCS CCSID associated with the default CCSID of the current server when the SQL statement containing the constant is prepared. If there is no DBCS CCSID associated with the CCSID of the source, the CCSID is 65535.
For information on associated DBCS CCSIDs, see the Use DBCS CCSIDs topic in the iSeries Information Center. For information on the CCSID of the source, see Character String Constants.
A hexadecimal Unicode graphic constant is supported. The form of the hexadecimal Unicode graphic constant is:
UX'ssss'
In the constant, ssss represents a string from 0 to 32760 hexadecimal digits. The number of characters between the string delimiters must be an even multiple of 4. Blanks between the string delimiters are ignored. Each group of 4 or more digits represents a single UTF-16 graphic character.
The CCSID of a UTF-16 constant is 1200.
(C) Copyright IBM Corporation 1992, 2006. All Rights Reserved.