VMS Help
COBOL, PROCEDURE_DIVISION, SORT, 2format_table
*Conan The Librarian
|
The SORT statement orders a table. It sorts the table elements
based on the keys as specified in the OCCURS for the table. The
table keys as specified in the OCCURS can be overridden with keys
as specified in the SORT statement. If no key is specified, the
table elements are the SORT keys.
Format -
SORT table-name [ ON { ASCENDING } KEY { sortkey } ... ] ...
[ { DESCENDING } ]
[ WITH DUPLICATES IN ORDER ]
[ COLLATING SEQUENCE IS alpha ].
is a table described with OCCURS in the Data Division.
is the data-name of a data item in the table-name table.
is an alphabet-name defined in the SPECIAL-NAMES paragraph of the
Environment Division.