The GRAPHIC, VARGRAPHIC, and LONG VARGRAPHIC data types provide Double-Byte Character Set (DBCS) support. Each character is two bytes long. The precision of one of these columns is the maximum number of two-byte characters that can be stored, not the physical length.
DBCS characters in SQL statements are delimited by the Shift-Out and Shift-In characters. Shift characters are either the IBM-defined characters (X'0E' and X'0F') or the Fujitsu-defined characters (X'28' and X'29'), as specified in the CXXMAINT OPTION=ALTER,DBCS=xxx option. If xxx is IS or IM, the shift characters are the IBM-defined characters. If xxx is FS or FM, the shift characters are the Fujitsu-defined characters.
Note: SQL does not check to make sure Shift characters are not used in SBCS strings, and there is no validation of DBCS characters. X'42' is used as the first byte of any (non-blank) DBCS character generated by SQL.
Default values for GRAPHIC, VARGRAPHIC, and LONG VARGRAPHIC columns are expressed as graphic literals in either the COBOL or PL/I formats. In these default literals the quote must always be the single-quote. The existing limit of 20 bytes maximum for all default values also applies to the GRAPHIC, VARGRAPHIC, and LONG VARGRAPHIC data types.
Ordering on DBCS Columns
GRAPHIC and VARGRAPHIC columns are indexed and/or used as sort fields, but the ordering is strictly byte-for-byte. There is no support provided for ordering the DBCS columns in other ways.
Indexing and ordering on MIXED columns is also strictly byte-for-byte. There is no normalizing of the strings so that equivalent DBCS versions of SBCS strings or substrings would compare equal.
Katakana Support
The code points used for the encoding of the Katakana language overlap the code points assigned to lower case EBCDIC letters, so special processing is required to support Katakana. If the CXXMAINT ALTER LANGUAGE option has been turned on, SQL supports Katakana, which also means lower-case English letters are not available. Even when LANGUAGE is K, SQL uses X'42', not X'43' as the first byte of any (non-blank) DBCS character it generates.
|
Copyright © 2014 CA.
All rights reserved.
|
|