Sorting a CICS selection list

To sort a CICS selection list, use the SORT primary command. You can sort a CICS selection list by any two fields displayed on the selection list, except the line command field and Status columns. The field names are the column heading values with the following exceptions:
  • Use "Dsn" for the Data set name field on the File selection list.
  • Use "Resource" for the Resource name field on the Enqueue selection list.

The sort sequence is ascending for columns with character values, and descending for columns with numeric values. The SORT primary command is also invoked for a single column by placing the cursor on the column heading and pressing Enter.

Example 1. File Selection list

The following example shows how the file list is sorted by dsn and then by type within dsn:
COMMAND ===> sort dsn type
   File    Data set name      Type  Sys
  ACCTFIL  FMN.CICS.ACCTFILE  VSAM
  ACCTNAM  FMN.CICS.ACCTNAME  KSDS
  ACINUSE  FMN.CICS.ACTINUSE  PATH

Example 2. Temporary Storage Selection List

The following example shows how the temporary storage can be sorted by size (descending) and queue name within size (ascending):
 COMMAND ===> sort size queue
   Queue Loc  Items       Size   Max
   FMT3  AUX     20       2560   128
   FMTS  AUX     10       1280   128
   FMT1  AUX     10       1280   128
   FMT2  AUX     10       1280   128
   FMT4  AUX     10       1280   128

Example 3. Transient Data Selection List

The following example shows how the transient data queue list can be sorted by type, and then disposition within type:
 COMMAND ===> sort Typ dsp
   Queue Typ DDname   Dsp
   CXRF  EXT DFHCXRF  MOD
   FMO1  EXT FMO1     SHR
   FMO2  EXT FMO2     SHR
   FMO3  EXT FMO3     SHR
   FMO4  EXT FMO4     SHR

Example 4. Enqueue Selection List

The following example shows how the enqueue selection list can be sorted by task (descending), and then resource name within task (ascending):
 COMMAND ===> sort task resource
   Resource name (first 36 characters)     Task
   ENQUEUE2                             0001177
   ENQUEUE4                             0001177
   ENQUEUE1                             0001176
   ENQUEUE3                             0001176
   ENQUEUE5                             0001176

Related topics