Start of change

SORT

The SORT command sorts data on the current tabular panel, including its alternate form (displayed with the ? command).

Where used

Any tabular panel.

Syntax and parameters

Read syntax diagramSkip visual syntax diagramSORTsort-columnADadditional-sort-columnAD+-sort-columnADOFFON?
Parameter Description
sort-column, additional-sort-column The title of the column to be sorted. Specify the title as it appears on the panel, or abbreviate it to a name that is unique on the panel. If the title contains blanks, either use an abbreviation that contains no blanks or enclose the title in quotation marks. You can sort on up to two columns in one command.
A | D Specifies that the sort order is either to be ascending (A) or descending (D). A is the default. When you enter two columns on a single command, you must specify either A or D for the first column.
+ | - sort-column Adds (+) or removes (-) sort criteria for a column. You can sort on up to 10 columns.
OFF | ON OFF turns sorting off for the current panel but retains the sort criteria. ON turns sorting on.
? Displays the sort criteria on the command line or pop-up. Under TSO, if the criteria do not fit on the command line, they are displayed on the message line.

Under ISPF, the sort criteria for each panel are saved.

Examples

SORT
Sorts using the fixed output field (for example, JOBNAME on the DA panel), ascending.
SORT FO A TOT-REC D

Sorts using the FORMS column, ascending, and then the TOT-REC column, descending.

Additional information

To sort on a single column, ascending, place the cursor on the column title and press Enter. Repeat this to sort descending. Repeat it again to remove this sort criteria. The cursor-sensitive sort may be ignored if you use it at the same time as a function that causes the cursor to move. The beginning of the title must be visible.

The titles for the same column on the primary and alternate form of a panel may be different. If so, SDSF recognizes the difference and sorts both the primary and alternate forms of the panel.

SDSF does not distinguish between duplicate column names that vary only by case.

End of change