ILE COBOL Language Reference

ASCENDING/DESCENDING KEY Phrase

This phrase specifies that records are to be processed in ascending or descending sequence (depending on the phrase specified), based on the specified sort keys.

data-name-1
Specifies a KEY data item on which the sort will be based. Each such data-name must identify a data item in a record associated with file-name-1. The following rules apply:

SORT lists the KEY data items from left to right in order of decreasing significance, no matter how they are divided into KEY phrases. The leftmost data-name is the major key, the next data-name is the next most significant key, and so forth.

The direction of the sorting operation depends on the specification of the ASCENDING or DESCENDING keywords as follows:


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]