COBOL Manual for TNS and TNS/R Programs
Environment Division
HP COBOL Manual for TNS and TNS/R Programs—522555-006
6-17
SPECIAL-NAMES Paragraph
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. The relative order within the
set of these unspecified characters is unchanged from their order in the collating
sequence.