COBOL Manual for TNS/E Programs (H06.08+, J06.03+)

The relative order within the set of these unspecified characters is unchanged from their order
in the collating sequence.
Program Collating Sequence and Figurative Constants
You can use the literal phrase of the ALPHABET clause to specify an arbitrary collating sequence
for use in nonnumeric comparisons, sorting, and the intrinsic functions CHAR and ORD. For
information on nonnumeric comparisons, see Arithmetic Operations (page 257). For information
on sorting, see SORT (page 441). For information on the intrinsic functions CHAR and ORD,
see CHAR Function (page 662)CHAR Function and ORD Function (page 682).
The character that has the highest ordinal position in the specified program collating sequence
is associated with the figurative constant HIGH-VALUE. If more than one character has the
highest position, the last character specified is associated with HIGH-VALUE.
The character that has the lowest ordinal position in the specified program collating sequence
is associated with the figurative constant LOW-VALUE. If more than one character has the
lowest position, the first character specified is associated with LOW-VALUE.
SYMBOLIC CHARACTERS Clause
The SYMBOLIC CHARACTERS clause assigns a name to a character, which can then be referenced
as a figurative constant. It is especially useful for nonprinting characters that some input interfaces
cannot except, such as the end-of-text character EXT.
character-list
assigns the name symbolic-char to the character in position within alphabet-name,
enabling you to reference the character as a figurative constant. A character-list must
have equal numbers of symbolic-char and position. The first symbolic-char
corresponds to the first position, and so on.
symbolic-char
is a user-defined COBOL word. No symbolic-char can appear more than once in the
set of SYMBOLIC CHARACTERS clauses in one program.
position
is an unsigned integer. Its value is in the range 1 through 256 and is the ordinal position
of a character in an alphabet (the first ASCII character has ordinal position 1, although it
is represented by octal 00).
alphabet-name
is an alphabet that includes the character to which you want to assign symbol-char. The
default is USASCII.
This SYMBOL-CHARACTERS clause sets C-RETURN to the carriage return character, which has
ordinal position 14:
SYMBOLIC CHARACTERS C-RETURN IS 14
112 Environment Division