Sorts the records according to your specifications. If you do not specify operands, the records in the data set are sorted into ascending order. If the data set is VSAM, the default sort key is the key column for a KSDS, the RBA for an ESDS, and the RRN for an RRDS. Otherwise, the default sort key is the entire record.
Syntax:
SORT [fcol1 lcol1[A|D]]…[fcol10 lcol10[A|D]
[KEY[A|D]]
[X|NX|ALL]
[label1 label2]
Syntax Description:
Sorts and displays the data according to the sort criteria.
Beginning column for the sort area.
Ending column for the sort area.
Sorts the records in ascending order.
Sorts the records in descending order.
Note: If you specify a column range but do not specify a sort order, the previously specified sort order is used.
Default: A
An alias for the column range that contains the VSAM key.
Specify up to ten sort keys. Specify each starting (fcolx) and ending (lcolx) column. You can also specify the sort order direction. When specified, a direction defaults to the most recently specified column range, and to all ranges that follow.
Only sorts excluded lines.
Only sorts non-excluded lines.
Specifies the beginning point in a range of lines to apply the sort.
Specifies the ending point in a range of lines to apply the sort.
Examples:
SORT KEY D
Sort on VSAM key into descending sequence
SORT 10 20 30 40
Sort on columns 10-20 and 30-40, in ascending sequence
SORT 10 20 D 30 40 50 60 A
Sort on columns 10-20 and 30-40 in descending sequence and columns 50-60 in ascending sequence
|
Copyright © 2015 CA Technologies.
All rights reserved.
|
|