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

literal-1, literal-2, literal-3
are unsigned integer literals or nonnumeric literals, but not symbolic-character figurative
constants.
An unsigned integer literal must have a value in the range 1 through 256. It is the ordinal
number of a character position in the computer’s character set (the first character has ordinal
number 1, even though its representation is octal 00).
A nonnumeric literal is an actual character or set of characters in the computer’s character set.
If a nonnumeric literal consists of exactly one character, the literal identifies that character. If
a nonnumeric literal consists of more than one character, the compiler handles it as an
abbreviation for a consecutive series of literal phrases that identify each of the specified
characters individually, in the order they appear in the nonnumeric literal.
Each nonnumeric literal in a THROUGH or ALSO phrase must specify exactly one character.
Usage Considerations
Alphabet-Name in PROGRAM COLLATING SEQUENCE Clause
When you include an alphabet-name in the PROGRAM COLLATING SEQUENCE clause of
the OBJECT-COMPUTER paragraph, you are specifying that the associated collating sequence
is to be used in nonnumeric comparisons performed throughout the program.
Alphabet-Name in COLLATING SEQUENCE Phrase
When you include an alphabet-name in the COLLATING SEQUENCE phrase of a SORT or
MERGE statement, you are specifying that the associated collating sequence is to be used in
nonnumeric comparisons performed by that statement.
Alphabet-Name in CODE-SET Clause of a File Description Entry
When you include an alphabet-name in a CODE-SET clause of a file description entry, you
are specifying that the associated character set is to be used in the external representation of
the data for that file.
Literal-Phrase
The THROUGH phrase can specify an ascending or descending sequence of characters. THRU
is equivalent to THROUGH. The compiler interprets the THROUGH phrase as an abbreviation
for a consecutive series of literal phrases, each identifying the next member of a set of
contiguous characters in the computer’s character set. The set begins with the character
identified by literal-1 and ends with the character identified by literal-2. If the
character identified by literal-1 occurs earlier in the collating sequence than the one
identified by literal-2, the implied literal sequence specifies the characters in their collating
order; otherwise, the implied literal sequence specifies the characters in the reverse of their
collating order.
The characters identified in the successive literal phrases, including any implicit literal phrases
generated by the interpretation previously described, are assigned successive ascending
positions in the collating sequence being defined by the ALPHABET clause. The order of
position assignment corresponds directly to the order of the literal phrases.
When a literal phrase includes one or more ALSO components, each character identified by
a literal-3 is assigned the same position in the collating sequence as the character
identified by the phrase’s literal-1.
Any characters of the collating sequence that are not identified in the successive literal phrases,
including any implicit literal phrases generated by the interpretations previously described,
are assigned collating sequence positions greater than that of the last character that is identified.
Configuration Section 111