Loading...
Select Version
Syntax rules
An elementary item which contains a USAGE NATIONAL clause or is subordinated to a group item with a USAGE NATIONAL clause must describe a national item with its PICTURE character-string.
The GROUP-USAGE clause may not be used together with the NATIONAL phrase.
General rules
The NATIONAL phrase specifies that the data item is to be stored in UTF-16 data format; that is, each character position is represented by 2 bytes.
All national characters are of the same length for COBOL. "Surrogate Pairs" are therefore regarded as 2 characters.
Example 7-31
Data formats for USAGE IS NATIONAL
Data category |
Value |
PICTURE description |
Internal representation*) |
|||||
national |
ABC |
NNN |
00 |
41 |
00 |
42 |
00 |
43 |
*) Each box represents 1 byte.