In tabular and summary views, use the SOrt or the Order command to sort data numerically or alphabetically, and in ascending or descending order.
| Element type in the column | |
---|
Sort a column by its default sort order. | | - On the COMMAND line, type SO or O.
- Place your cursor on the column by which you want to sort.
Press Enter. Note Numeric data is sorted in descending order (high to low). Alphabetic data is sorted in ascending order (A to Z).
|
Sort a column in ascending or descending order. | | - On the COMMAND line, type SO A, O A, SO D, or O D.
Order is:
- A for ascending order.
- D for descending order.
- Place your cursor on the column by which you want to sort.
- Press Enter.
|
Sort a column by its internal name in ascending or descending order. | | - Determine the internal name of the column you want to sort.
- Put your cursor on the column you want to sort.
- Press the Help (PF1) key.
In the online Help, a statement similar to the following example indicates the element name, which is the column's internal name: The element name for this field is xxxxxxxx.
Type SORT internalColumnName.[A|D]. Order is: - A for ascending order.
- D for descending order.
Notes When you use an internal column name, you must insert a period (.) between the internal column name and the order parameter. If the element identified for the internal column name is a summary type of element, the sort will not work. Use the procedure for sorting columns that use summary types of elements.
|
Sort a column by its internal name in ascending or descending order. | | - Determine the internal name of the column you want to sort.
- Put your cursor on the column you want to sort.
Press the Help (PF1) key. In the online Help, statements similar to the following example indicate what summary type is associated with the column (highlighted text) and the element name, which is the column's internal name: Note that this field contains the of any row of data with the same Jobname, ASRE Token.
The element name for this field is ASSDCTTM.
Type SORT internalColumnName:summaryType.[A|D] . The valid summary types are: - AVE or AVG for an average summary type.
- COU and CNT for a count summary type.
- MAX for a maximum summary type.
- MIN for a minimum summary type.
- PER and PCT for a percentage summary type.
- SUM for a summation type.
Order is: - A for ascending order.
- D for descending order.
Note When you use an internal column name that has a summary type: - You must insert a colon (:) between the internal column name and the summary type.
- You must insert a period (.) between the summary type and the order parameter.
- If the summary type is COUNTIF, you cannot use that element as the basis for sorting view data. The reason for this limitation is that multiple COUNTIF conditions can be defined for a single element, but the same element name is used in all cases. If you select an element with a summary type of COUNTIF, the message INVALID SORT FIELD appears in the ISPF short message area.
|
Examples
- To order elements by their defaults, type SOrt on the COMMAND line, move your cursor to the label of the column that you want to sort, and press Enter.
- To use the Order command with a parameter, type Order D on the COMMAND line, move your cursor to the label of the column that you want to arrange in descending order, and press Enter.