Consider the characteristics of DBCS data when you define a DBCS
field.
- Each DBCS character is 2 bytes long.
- The length of a DBCS character string is always even.
- Shift-out (SO) and shift-in (SI) control characters are required at the
beginning and end of the DBCS character string, except for graphic-data type
fields. Together, these characters are 2 bytes long.
- The system treats DBCS data the same as character data, and therefore
cannot perform arithmetic operations on it.
- The following DBCS data types can be used to identify DBCS fields:
- J (DBCS-only) for fields that can contain only bracketed DBCS data.
- E (DBCS-either) for fields that can contain bracketed DBCS or SBCS data,
but not both.
- O (DBCS-open) for fields that can contain both SBCS and bracketed DBCS
data.
- G (DBCS-graphic) for fields that can contain graphic data without the
SO and SI control characters.
Data type O is allowed in all types of files. Data types J and E are
allowed only in database and display files. Data type G is allowed in database,
display, and printer files. In most cases, the operating system automatically
inserts shift-out and shift-in characters. An exception is when data is written
into a data type G field in a database file.