COBOL Manual for TNS/E Programs (H06.08+, J06.03+)
hex-digit
is one of the characters 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F, a, b, c, d, e, f. A
hexadecimal nonnumeric literal can have at most 320 hexadecimal digits (160 pairs), excluding
the delimiting quotation marks.
A hexadecimal nonnumeric literal can appear anywhere that a simple nonnumeric literal can
appear.
Example 11 Hexadecimal Nonnumeric Literals
X"00"
X"0F"
X"0123456789ABCDEF"
X"1003c55b"
National Literals
A national literal is used for those spoken languages not represented by roman letters and Arabic
numbers. An example is the Japanese Kanji alphabet. To use national literals, you must have a
special terminal and a special keyboard.
As with other types of literals, the character-string of a national literal has the value of the sequence
of its characters. Each character is represented internally by 2 bytes.
char
is any character in the national character set, including a punctuation character. A national
literal can have at most 160 characters, excluding the delimiting quotation marks.
National literals follow these rules:
• The letter N or n and the quotation marks are part of the character-string that represents the
literal; they are not part of the value of the literal.
• HP COBOL accepts only the double quotation mark ("), not the apostrophe ('), as a quotation
mark.
• The value of a national literal is the ordered sequence of characters in its representation,
excluding the delimiting quotation marks. The maximum number of characters allowed on a
line depends on the column in which the literal begins.
• The literal represents a data item of the national category whose value is the value of the
literal.
• Punctuation characters appearing within a character-string that represents a national literal
are components of its value and are never interpreted as separators. Each character is
represented internally as 2 bytes.
Character-Strings 73










