Editing the template for the "From" data set

If you select the Edit template option on the Import Utility From panel, FM/Db2 displays the Field Selection/Edit panel (see Import Utility: Field Selection/Edit panel for the “From” data set).

You can narrow down which records you want to process by specifying record selection criteria. Only records whose contents satisfy the criteria are selected. You specify record selection criteria using REXX comparison expressions.

Note: Record selection criteria is applied on the input data before any field mapping or data conversion is performed, whereas the REXX import procedure applies after any field mapping or data conversion is performed.
For example, the template shown in Import Utility: Field Selection/Edit panel for the “From” data set has been edited to select only records that meet certain criteria. If you use this template as the From template for your Import utility, the data imported is restricted to records where SALARY contains a value greater than 50 000.
Figure 1. Import Utility: Field Selection/Edit panel for the “From” data set
  Process   Options   Help
 ______________________________________________________________________________
 File Manager                 Field Selection/Edit                 Line 1 of 10

 ----------- Criteria - Enter 1 or 2 to specify expression by field -----------
 1 Id :                                                                       +
 2 Sel: #6 > 50000                                                            +
 Offset      5
 Cmd Seq SHE Ref Field Name                           Picture  Type Start Length
                 ****  Top of data  ****
        S     1 1 REC-TYPE01                                   AN      1     85
        S     2  2 REC-TYPE                          XX        AN      6      2
        S     3  2 NAME                              X(20)     AN      8     20
        S     4  2 EMPLOYEE-NO                       9(4)      BI     28      2
        S     5  2 AGE                               9(4)      BI     30      2
        S     6  2 SALARY                            9(7)      PD     32      4
        S     7  2 MONTH OCCURS 12 TIMES             9(8)      BI     36      4
        S     8  2 FILLER                            XX        AN     84      2
                 ****  End of data  ****


 Command ===>                                                       Scroll HALF
  F1=Help      F2=Split     F3=Exit      F4=Expand    F5=RFind     F6=RunTemp
  F7=Up        F8=Down      F9=Swap     F10=Left     F11=Right    F12=Cancel
  

If you press Enter, FM/Db2 saves the updated template and returns you to the Import Utility “From” panel.

Note: For more information about specifying record selection criteria, see the File Manager User’s Guide and Reference.

Related tasks

Related references