Rational Developer for System z
COBOL for Windows, Version 7.5, Language Reference


Hexadecimal notation for national literals

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.

NX“ or NX'
Opening delimiters. The opening delimiter must be represented in single-byte characters. It must not be split across lines.
” or '
The closing delimiter. The closing delimiter must be represented as a single-byte character.

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.

hexadecimal-digits
Hexadecimal digits in the range '0' to '9', 'a' - f', and 'A' to 'F', inclusive. Each group of four hexadecimal digits represents a single national character and must represent a valid code point in UTF-16. The number of hexadecimal digits must be a multiple of four.

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.

Maximum length
The length of a national literal in hexadecimal notation must be from four to 320 hexadecimal digits, excluding the opening and closing delimiters. The length must be a multiple of four.
Continuation rules
Normal continuation rules apply.

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.


Terms of use | Feedback

Copyright IBM Corporation 1996, 2008.
This information center is powered by Eclipse technology. (http://www.eclipse.org)