Changing the sequence of displayed or printed columns
By default, FM/Db2 displays or prints columns in the sequence they are defined in the Db2® catalog. This is the same sequence that the column names are displayed in the Column Selection/Edit panel.
To change the order in which columns are displayed or printed,
use the Seq field on the Column Selection/Edit panel to specify
an alternative order.
Note: The Seq field on the Column Selection/Edit
panel affects only the sequence in which FM/Db2 displays or prints
columns. It has no effect on the sequence in which columns are exported
when you use the Export utility function (3.7).
For example, on the Column Selection/Edit panel shown in Primary Column Selection/Edit panel showing column sequence selection, to make the JOB column be shown first, then the HIREDATE column (followed by the remaining columns):
- In the Seq column against the JOB column, type
1
. - In the Seq column against the HIREDATE column, type
2
.The Column Selection/Edit panel now looks like this:Figure 1. Primary Column Selection/Edit panel showing column 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 S 5 WORKDEPT CHARACTER(3) Y Null S 6 PHONENO CHARACTER(4) Y Null 2 S 7 HIREDATE DATE Y Null 1 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
- Press the RunTemp function key (F6).
The data is displayed showing the revised order of the columns:
Process Options Utilities Help ──────────────────────────────────────────────────────────────────────────────── FM/Db2 (DFG2) Table Browse 42 rows fetched TABLE FMNUSER.EMP Format TABL JOB HIREDATE EMPNO FIRSTNME MIDDLE INITIAL LASTNAME WORKDEP #8 #7 #1 #2 #3 #4 #5 CH(8) DATE CH(6) VARCHAR(12) CHARACTER(1) VARCHAR(15) CH(3) <---+--> <---+----> PU--+> <---+----1-> - <---+----1----> <-NF **** Top of data **** PRES 01/01/1965 000010 CHRISTINE< I HAAS< A00 MANAGER 10/10/1973 000020 MICHAEL< L THOMPSON< B01 MANAGER 04/05/1975 000030 SALLY< A KWAN< C01 MANAGER 08/17/1949 000050 JOHN< B GEYER< E01 MANAGER 09/14/1973 000060 IRVING< F STERN< D11 MANAGER 09/30/1980 000070 EVA< D PULASKI< D21 MANAGER 08/15/1970 000090 EILEEN< W HENDERSON< E11 MANAGER 06/19/1980 000100 THEODORE< Q SPENSER< E21 SALESREP 05/16/1958 000110 VINCENZO< G LUCCHESI< A00 CLERK 12/05/1963 000120 SEAN< O'CONNELL< A00 ANALYST 07/28/1971 000130 DOLORES< M QUINTANA< C01 ANALYST 12/15/1976 000140 HEATHER< A NICHOLLS< C01 Command ===> _____________________________________________________ Scroll PAGE F1=Help F2=Zoom F3=Exit F4=CRetriev F5=RFind F6=RChange F7=Up F8=Down F9=Swap F10=Left F11=Right F12=Cancel
Related tasks
Related references