Defining national data items
Define national data items with the USAGE
NATIONAL
clause
to hold national (UTF-16) character strings.
About this task
You can define national data items of the following categories:
- National
- National-edited
- Numeric-edited
To
define a category national data item, code a PICTURE
clause
that contains only one or more PICTURE
symbols N
.
To define a national-edited data item, code a PICTURE
clause
that contains at least one of each of the following symbols:
- Symbol
N
- Simple
insertion editing symbol
B
,0
, or/
To define
a numeric-edited data item of class national, code
a PICTURE
clause that defines a numeric-edited item
(for example, -$999.99
) and code
a USAGE NATIONAL
clause. You
can use a numeric-edited data item that has USAGE NATIONAL
in
the same way that you use a numeric-edited item that has USAGE
DISPLAY
.
You can also define a data item as numeric-edited by coding
the BLANK WHEN ZERO
clause for an elementary item
that is defined as numeric by its PICTURE
clause.
If
you code a PICTURE
clause but do not code a USAGE
clause
for data items that contain only one or more PICTURE
symbols N
,
you can use the compiler option NSYMBOL(NATIONAL)
to
ensure that such items are treated as national data items instead
of as DBCS items.