Defining DBCS data
Use the PICTURE
and USAGE
clauses to define DBCS data items. DBCS data items can use PICTURE
symbols G
, G
and B
,
or N
. Each DBCS character position is 2 bytes in
length.
About this task
You
can specify a DBCS data item by using the USAGE DISPLAY-1
clause.
When you use PICTURE
symbol G
, you
must specify USAGE DISPLAY-1
. When you use PICTURE
symbol N
but
omit the USAGE
clause, USAGE DISPLAY-1
or USAGE
NATIONAL
is implied depending on the setting of the NSYMBOL
compiler
option.
If you use a VALUE
clause with the USAGE
clause
in the definition of a DBCS item, you must specify
a DBCS literal or the figurative constant SPACE
or SPACES
.
If a data item has USAGE DISPLAY-1
(either
explicitly or implicitly), the selected locale must indicate a code
page that includes DBCS characters. If the code page of the locale
does not include DBCS characters, such data items are flagged as errors.
For the purpose of handling reference modifications, each character in a DBCS data item is considered to occupy the number of bytes that corresponds to the code-page width (that is, 2).