DBCS field data types

 

There are two general kinds of double-byte character set (DBCS) data: bracketed-DBCS data and graphic (nonbracketed) DBCS data.

Bracketed-DBCS data is preceded by a DBCS shift-out character and followed by a DBCS shift-in character. Graphic-DBCS data is not surrounded by shift-out and shift-in characters. The application program might require special processing to handle bracketed-DBCS data that would not be required for graphic-DBCS data. The specific DBCS data types (specified in position 35 on the DDS coding form.) are:

Entry

Meaning

O

DBCS-open: A character string that contains both single-byte and bracketed double-byte data.

E

DBCS-either: A character string that contains either all single-byte data or all bracketed double-byte data.

J

DBCS-only: A character string that contains only bracketed double-byte data.

G

DBCS-graphic: A character string that contains only nonbracketed double-byte data.

Files containing DBCS data types can be created on a single-byte character set (SBCS) system. Files containing DBCS data types can be opened and used on a SBCS system, however, coded character set identifier (CCSID) conversion errors can occur when the system tries to convert from a DBCS or mixed CCSID to a SBCS CCSID. These errors do not occur if the job CCSID is 65535.

 

DBCS constants

A constant identifies the actual character string to be used. The character string is enclosed in single quotation marks and a string of DBCS characters is surrounded by the DBCS shift-out and shift-in characters (represented by the characters < and > in the following examples). A DBCS-graphic constant is preceded by the character G. The types of DBCS constants are:

Type

Example

DBCS-Only

'<A1A2A3>'

DBCS-Open

'<A1A2A3>BCD'

DBCS-Graphic

G'<A1A2A3>'

 

Parent topic:

Double-byte character set considerations