The following are the format and rules for the hexadecimal notation format of national literals.
| Format 2: Hexadecimal notation for national literals |
|---|
NX“hexadecimal-digits” NX'hexadecimal-digits' |
The hexadecimal notation format of national literals is not affected by the NSYMBOL compiler option.
If a quotation mark is used in the opening delimiter, it must be used as the closing delimiter. Similarly, if an apostrophe is used in the opening delimiter, it must be used as the closing delimiter.
The syntax of hexadecimal notation uses big-endian representation on all platforms. This is the normal representation for COBOL for AIX® and Enterprise COBOL for z/OS®. You must enter the hexadecimal notation in big-endian, but the compiler converts the value to little-endian for use at run time.
The content of a national literal in hexadecimal notation is stored as national characters. The resulting content has the same meaning as a basic national literal that specifies the same national characters.
A national literal in hexadecimal notation has data class and category national and can be used anywhere that a basic national literal can be used.