SORT Sort File List

SORT [sort-opt] The current file list is resorted. No new selection takes place. If no sort options are specified, then the list is resorted according to the criteria last specified. The same options may be given for sort-opt as for those that may be entered in the SORT-OPTION field of the Selection mask (see page 4-) or in the SO command (see page 18-).

sort-opt (o,l) | AGE | NAME [(o,l)] | SIZE | USER | NONE [, A | D ]

(o,l) Sort according to an absolute column number (o = Offset, l = Length).

The offset is the column number which appears at the top of the file list after issuing an SC command.

Specifying (8,1) for example, will cause the list to be sorted according to the data object type.

NAME [(o,l)] The file list is sorted according to the full file or element name (Standard). Specifying optional parameters (o,l), the names can be sorted on a portion of the file or element name. o specifies the offset, and l the length of the partial field. Standard: NAME(1,44).

Example: With PLAM libraries, specifying Sort Option NAME(3,40) will result in a sorted list whereby elements are sorted by name and then by type.

AGE The file list is sorted according to AGE, or DATE. The time of the last amendment of PLAM library elements is taken into account when sorting.

SIZE The file list is sorted on the contents of the first column (LASTP or ALLOC for files, SPACE for libraries).

USER If a USER OPTION is also specified when selecting files, the sorting is done on the value in the column specified in this option. If no USER OPTION is specified, this sort option has no effect.

NONE The file/element list is displayed unsorted.

A Ascending sort order (Standard).

D Descending sort order.

Note

When a sort option is explicitly specified, then the sort takes place over the entire file list, even if the list has been created incrementally by successive AL commands. In the standard case, the area to be sorted is restricted to an NP/AL command.

Examples:

SORT AGE

The current file or element list is sorted in ascending order according to the age of the data objects.

SORT SIZE,D

The current file list is sorted in descending order according to the LASTP entry.