PROCEDURE DIVISION
An ASCII-collated sort or merge operation can be specified in two ways as described in the topic.
- Through the PROGRAM COLLATING SEQUENCE clause in the OBJECT-COMPUTER paragraph. In this case, the ASCII collating sequence is used for alphanumeric comparisons explicitly specified in relation conditions and condition-name conditions.
- Through the COLLATING SEQUENCE phrase of the SORT or MERGE statement. In this case, only this sort or merge operation uses the ASCII collating sequence.
In either case, alphabet-name must be associated with STANDARD-1 (for ASCII collating sequence) in the SPECIAL-NAMES paragraph.
For this sort or merge operation, the COLLATING SEQUENCE phrase of the SORT or MERGE statement takes precedence over the PROGRAM COLLATING SEQUENCE clause in the OBJECT-COMPUTER paragraph.
If both the PROGRAM COLLATING SEQUENCE clause and the COLLATING SEQUENCE phrase are omitted (or if the one in effect specifies an EBCDIC collating sequence), the sort or merge is performed using the EBCDIC collating sequence.