Editing the template for the "From" table

If you select the Edit template option on the Export Utility panel, FM/Db2 displays the Column Selection/Edit panel. You can use this panel to restrict the data in the From table that you want exported by:
  • Selecting (or deselecting) specific columns for exporting.
  • Specifying row selection criteria. Only rows whose contents satisfy the criteria are selected for exporting.
Note: When you export data in FM/Db2 internal (SQLDA) format, you cannot alter the order in which the columns are exported. Data is always exported in the order that the columns are defined in the Db2® catalog (the same order in which the columns are displayed in the Column/Selection Edit panel).

The Export Utility ignores any information specified in the Seq field of the template (this information is used to change the order in which FM/Db2 displays or prints columns).

For example, the template shown in Column Selection/Edit panel for the “From” table has been edited to select certain columns and only rows whose contents meet certain criteria. If you use this template as the From template for your Export, the data exported is restricted to:
  • The columns FIRSTNME, LASTNAME, WORKDEPT, and JOB, but only where WORKDEPT equals MNT and JOB equals PAINTER.
Figure 1. Column Selection/Edit panel for the “From” table
  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: WHERE "WORKDEPT" = 'MNT' AND "JOB" = 'PAINTER'                        +

 Cmd Seq SHEX CL# Column name          Data type(length)  Null Default  Order A/D
                  ****  Top of data  ****
                1 EMPNO                CHARACTER(6)            None             
         S      2 FIRSTNME             VARCHAR(12)             None             
                3 MIDINIT              CHARACTER(1)            None             
         S      4 LASTNAME             VARCHAR(15)             None             
         S      5 WORKDEPT             CHARACTER(3)        Y   Null             
                6 PHONENO              CHARACTER(4)        Y   Null             
                7 HIREDATE             DATE                Y   Null             
         S      8 JOB                  CHARACTER(8)        Y   Null             
                9 EDLEVEL              SMALLINT            Y   Null             
               10 SEX                  CHARACTER(1)        Y   Null             
               11 BIRTHDATE            DATE                Y   Null             
               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

Related tasks

Related references