Sort a member list (SORT)

The SORT primary command arranges a member list according to the fields you specify. The sort sequence, ascending or descending, is determined by the fields you choose and is maintained between member list displays.

The format of this command is:

Read syntax diagramSkip visual syntax diagram
                 .-A-.                      
>>-SORT--field1--+---+--+---------------+----------------------><
                 '-D-'  |         .-A-. |   
                        '-field2--+---+-'   
                                  '-D-'     

where:
field1
The primary field by which the member list is sorted.
field2
The secondary field by which the member list is sorted.
A|D
The direction in which values are sorted for this field (A=ascending, D=descending).
Table 1 and Table 2 show:
Note: When multicultural support is enabled, the field names listed in Table 1 and Table 2 may be displayed in the national language. If they are then the SORT command will expect field1 or field2 to be entered in the national language, or the standard abbreviation to be used.
Table 1. Sort Fields for Source Libraries
Field Sequence Description
Name Ascending Member name
Lib Ascending Library in concatenation sequence
VV Ascending ISPF version number
MM Ascending ISPF modification level
Created Descending Creation date
Changed Descending Date and time last changed
Size Descending Current number of records
Init Descending Initial number of records
Mod Descending Number of modified records
ID Ascending Last user
Prompt Descending Prompt field
Table 2. Sort Fields for Load Libraries
Field Sequence Description
Name Ascending Member name
Lib Ascending Library in concatenation sequence
Size Descending Load module size
TTR Ascending TTRN of beginning of load module
Alias-Of Ascending Member this is an alias of
AC Ascending Authorization code
AM Descending 1 Addressing mode
RM Descending 1 Residency mode
Attributes Descending Load module attributes
SSI Ascending System Status Index
Prompt Descending Prompt field

For example, to sort a member list by size and then by track record, enter:
SORT SIZE TTR
To sort a member list by creation date in ascending order, enter:
SORT CREATED A
1 For the AM and RM columns, the value ANY is considered to be the largest value and will therefore sort to the top of the list.