Parameters of the SORT command

The SORT command provides the parameters ON, OFF, DESCENDING, and ASCENDING.

ON
Activates sort.

Values previously specified in the DB2® Thread Sort Specification window are used.

OFF
Deactivates sort.
fieldid
Identifies a field used for sorting threads and activates sort. You can specify multiple fields. The threads are sorted by the order of the specified fields.
DESCENDING
Specifies that the threads are to be sorted in descending sequence. This parameter can be abbreviated to D. This is the default.
ASCENDING
Specifies that the threads are to be sorted in ascending sequence. This parameter can be abbreviated to A.
Note:
  1. If only one field is specified in a SORT command, you do not need to specify the sequence. The sequence is descending by default.
  2. If multiple fields are specified, the sequence (ascending or descending) needs to be specified for each field except the last one.
  3. All parameters specified in the command are separated by a single space.
The following table lists all fields that you can use with the SORT command. The field identifiers can be truncated. Uppercase letters indicate the shortest valid abbreviation for each field identifier.
Table 1. Sort fields
Field Field ID
Primary Authorization ID PRImauth
Plan Name PLanname
Package/DBRM Program name PROgram
Package Collection ID COLlection
Correlation ID CORrelation
Connection ID CONNEct
Connection Type CONNType
Thread Status Status
Request Count REQUests
Requesting Location REQLoc
Class 1 elapsed time C1Elapsed
Class 1 CPU time C1Cpu
Class 2 elapsed time C2Elapsed
Class 2 CPU time C2Cpu
Class 3 time C3Elapsed