SORT field[-seq][,field[-seq]], …]
where:
Specifies the name of the field to be sorted.
This field can be a database field, a defined field, or a reserved field.
Specifies the sequence for sorting the field.
The sequence A is used for sorting in ascending sequence; the sequence D is used for sorting in descending sequence. If omitted, the field is sorted in ascending sequence.
The SORT control statement cannot be embedded within IF or DO control statements. Statements supplied before the SORT control statement are considered statements that are executed before the sort record is released to the sort, and statements following the SORT control statement are statements that are executed after the sort record is returned from the sort.
Sorting is not necessary for a majority of report requests. The database currently maintains crucial information in sequential order. The sequence of data retrieved from the database without sorting is determined by the following conditions:
Because the database fields that are referenced do not necessarily imply the true intent of your request, the sequence in which database records are accessed can be overridden by the CONTROL control statement. See the CONTROL control statement for further information.
|
Copyright © 2015 CA Technologies.
All rights reserved.
|
|