Changing the sequence of displayed or printed rows
To change the order in which rows are displayed or printed, use
the Order field and, optionally, the A/D field on the
Column Selection/Edit panel. For the most significant column, type “1”
in the Order field; for the next most significant column, type “2”
in the Order field, and so on. If you use the Order field,
rows are displayed in ascending sequence by default. To display the
rows in descending sequence, type “D” in the A/D field.
If you use either the Order or A/D fields on the
Column Selection/Edit panel, FM/Db2 adds an ORDER BY clause to the
SQL SELECT statement used to retrieve the data from Db2®.
For example, on the Column Selection/Edit panel shown in Primary Column Selection/Edit panel showing row sequence selection, the Order and A/D fields specify
rows to be shown in the sequence LASTNAME (ascending) within WORKDEPT (descending).
Figure 1. Primary Column Selection/Edit panel showing row sequence selection
Process Options Utilities Help
────────────────────────────────────────────────────────────────────────────────
FM/Db2 (DFG2) Column Selection/Edit Line 1 of 16
TABLE FMNUSER.EMP
------- Row Selection Criteria ---- (Use SQL/PF4 for full screen edit) -------
1 Sel: +
Cmd Seq SHEX CL# Column name Data type(length) Null Default Order A/D
**** Top of data ****
S 1 EMPNO CHARACTER(6) None S 2 FIRSTNME VARCHAR(12) None S 3 MIDINIT CHARACTER(1) None S 4 LASTNAME VARCHAR(15) None 2A S 5 WORKDEPT CHARACTER(3) Y Null 1D S 6 PHONENO CHARACTER(4) Y Null S 7 HIREDATE DATE Y Null S 8 JOB CHARACTER(8) Y Null S 9 EDLEVEL SMALLINT Y Null S 10 SEX CHARACTER(1) Y Null S 11 BIRTHDATE DATE Y Null S 12 SALARY DECIMAL(9,2) Y Null
Command ===> _____________________________________________________ Scroll PAGE
F1=Help F2=Split F3=Exit F4=SQL F5=RFind F6=RunTemp
F7=Up F8=Down F9=Swap F10=Left F11=Right F12=Cancel
When the data is displayed, it appears in the revised sequence:
Figure 2. Table Browse panel