Setting up mapping for a column

To set up or change the mapping for a column, enter S in the Cmd field against the column name. The From Column Mapping panel is displayed.
Figure 1. From Column Mapping panel
  Process   Options   Utilities   Help
────────────────────────────────────────────────────────────────────────────────
 FM/Db2 (DFG2)                From Column Mapping
 To Db2 object . . : DSN8810.EEMP
 From Db2 object . : DSN8810.EMP
 To column . . . . : #15 RID
 From column . . . :

 Sel   Cl#  From Column             Data Type(length)
            ****  Top of data  ****
 ___     D  Delete "From column"
 ___     1  EMPNO                   CHARACTER(6)
 ___     2  FIRSTNME                VARCHAR(12)
 ___     3  MIDINIT                 CHARACTER(1)
 ___     4  LASTNAME                VARCHAR(15)
 ___     5  WORKDEPT                CHARACTER(3)
 S__     6  PHONENO                 CHARACTER(4)
 ___     7  HIREDATE                DATE
 ___     8  JOB                     CHARACTER(8)
 ___     9  EDLEVEL                 SMALLINT
 ___    10  SEX                     CHARACTER(1)
 Command ===> _____________________________________________________ Scroll PAGE
  F1=Help      F2=Split     F3=Exit      F4=CRetriev  F7=Up        F8=Down
  F9=Swap     F12=Cancel

In From Column Mapping panel, the information at the top of the panel shows you the current mapping. In the figure, the To column is RID. There is currently no From column shown because there is no column in the From template with the same name.

To change the From column, enter S against the new From column. The information at the top of the panel changes immediately to reflect the new mapping. For example, if you enter S against column #6 (PHONENO), the information at the top of the panel changes:
;
 FM/Db2 (DFG2)                From Column Mapping
 To Db2 object . . : DSN8810.EEMP
 From Db2 object . : DSN8810.EMP
 To column . . . . : #15 RID
 From column . . . : #6 PHONENO
and the Template Mapping panel also changes to show that PHONENO is mapped to RID:
;
 FM/Db2 (DFG2)                 Template Mapping

 To          FMNUSER.EEMP
 From        FMNUSER.EMP

 Cmd CL# To Column name  Datatype  NI   CL# From Column name        Datatype  NI
         ****  Top of data  ****
       1 EMPNO           CH(6)     NN |   1 EMPNO                   CH(6)     NN
⋮
      12 SALARY          DEC(9,2)     |  12 SALARY                  DEC(9,2)
      13 BONUS           DEC(9,2)     |  13 BONUS                   DEC(9,2)
      14 COMM            DEC(9,2)     |  14 COMM                    DEC(9,2)
      15 RID             CH(4)        |   6 PHONENO                 CH(4)
      16 TSTAMP          TIMESTAMP    |
         ****  End of data  ****
 Command ===>                                                       Scroll PAGE
  F1=Help      F2=Split     F3=Exit      F4=CRetriev  F5=RFind     F6=RunTemp
  F7=Up        F8=Down      F9=Swap     F12=Cancel

There is now an entry in the From column against RID.

To remove the current mapping for a To column, enter S against Delete From column on the From Column Mapping panel for that column. For example, the Template Mapping panel shown in Template Mapping panel shows that the To column BONUS is mapped to the From column BONUS. To remove the mapping for BONUS (so that it is not mapped to any From column):

  1. On the Template Mapping panel shown in Template Mapping panel, enter S in the Cmd field against column #13 (BONUS).

    The From Column Mapping panel is displayed as shown in From Column Mapping panel showing Delete “From column” selected.

  2. Enter S against Delete “From column”.
    Figure 2. From Column Mapping panel showing Delete “From column” selected
      Process   Options   Utilities   Help
    ────────────────────────────────────────────────────────────────────────────────
     FM/Db2 (DFG2)                From Column Mapping
     To Db2 object . . : DSN8810.EEMP
     From Db2 object . : DSN8810.EMP
     To column . . . . : #13 BONUS
     From column . . . : #13 BONUS
    
     Sel   Cl#  From Column             Data Type(length)
                ****  Top of data  ****
     S__     D  Delete "From column"
     ___     1  EMPNO                   CHARACTER(6)
     ___     2  FIRSTNME                VARCHAR(12)
     ___     3  MIDINIT                 CHARACTER(1)
     ___     4  LASTNAME                VARCHAR(15)
     ___     5  WORKDEPT                CHARACTER(3)
     ___     6  PHONENO                 CHARACTER(4)
             7  HIREDATE                DATE
     ___     8  JOB                     CHARACTER(8)
     ___     9  EDLEVEL                 SMALLINT
     ___    10  SEX                     CHARACTER(1)
            11  BIRTHDATE               DATE
     ___    12  SALARY                  DECIMAL(9,2)
     ___    13  BONUS                   DECIMAL(9,2)
     ___    14  COMM                    DECIMAL(9,2)
                ****  End of data  ****
     Command ===> _____________________________________________________ Scroll PAGE
      F1=Help      F2=Split     F3=Exit      F4=CRetriev  F7=Up        F8=Down
      F9=Swap     F12=Cancel
  3. Press Enter.
    The From column mapping information (fourth line on the From Column Mapping panel) for BONUS is displayed.
    Figure 3. From Column Mapping panel showing From column mapping information deleted
      Process   Options   Utilities   Help
    ────────────────────────────────────────────────────────────────────────────────
     FM/Db2 (DFG2)                From Column Mapping
     To Db2 object . . : DSN8810.EEMP
     From Db2 object . : DSN8810.EMP
     To column . . . . : #13 BONUS
     From column . . . :
    
     Sel   Cl#  From Column             Data Type(length)
                ****  Top of data  ****
     ___     D  Delete "From column"
     ___     1  EMPNO                   CHARACTER(6)
     ___     2  FIRSTNME                VARCHAR(12)
     ___     3  MIDINIT                 CHARACTER(1)
     ___     4  LASTNAME                VARCHAR(15)
     ___     5  WORKDEPT                CHARACTER(3)
     ___     6  PHONENO                 CHARACTER(4)
             7  HIREDATE                DATE
     ___     8  JOB                     CHARACTER(8)
     ___     9  EDLEVEL                 SMALLINT
     ___    10  SEX                     CHARACTER(1)
            11  BIRTHDATE               DATE
     ___    12  SALARY                  DECIMAL(9,2)
     ___    13  BONUS                   DECIMAL(9,2)
     ___    14  COMM                    DECIMAL(9,2)
                ****  End of data  ****
     Command ===> _____________________________________________________ Scroll PAGE
      F1=Help      F2=Split     F3=Exit      F4=CRetriev  F7=Up        F8=Down
      F9=Swap     F12=Cancel
  4. Press the Exit function key (F3).
    The Template Mapping panel is displayed showing the To column BONUS is now not mapped to any From column.
    Figure 4. Template Mapping panel showing the “To” column BONUS not mapped to any “From” column
     FM/Db2 (DFG2)                 Template Mapping
    
     To          FMNUSER.EEMP
     From        FMNUSER.EMP
    
     Cmd CL# To Column name  Datatype  NI   CL# From Column name        Datatype  NI
             ****  Top of data  ****
           1 EMPNO           CH(6)     NN |   1 EMPNO                   CH(6)     NN
    ⋮
          12 SALARY          DEC(9,2)     |  12 SALARY                  DEC(9,2)
          13 BONUS           DEC(9,2)     |
          14 COMM            DEC(9,2)     |  14 COMM                    DEC(9,2)
          15 RID             CH(4)        |   6 PHONENO                 CH(4)
          16 TSTAMP          TIMESTAMP    |
             ****  End of data  ****
     Command ===>                                                       Scroll PAGE
      F1=Help      F2=Split     F3=Exit      F4=CRetriev  F5=RFind     F6=RunTemp
      F7=Up        F8=Down      F9=Swap     F12=Cancel
Note: Db2® determines the default value for an unmapped column according to the definition of the column in the Db2® catalog.