Step 4. Use the FM/Db2 editor (normal and related edit)

Log on to FM/Db2, and connect to the same Db2® system specified in Step 1. Define Db2 objects to be used during verification. Select the FM/Db2 editor by typing '2' on the FM/Db2 main menu. Press Enter.
Figure 1. Db2® Edit panel
  Process   Options   Utilities   Help
 ──────────────────────────────────────────────────────────────────────────────
 FM/Db2 (DFF2)                      Db2 Edit
 Command ===>                                                                  

 Db2 Object:
    Location  . . . . .                      Database  . . .          (optional)
    Owner . . . . . . . FMN0USR           +  Table Space . .          (optional)
    Name  . . . . . . . *                                                      +
    Start position  . . 1         
    Row count . . . . . 100            Number of rows to edit

 Template:
    Data set name . . .                                               
    Member  . . . . . .         

 Processing Options:
    Template usage                     Enter "/", "A"lways to select option
    3  1. Above                           Edit options
       2. Previous                        Edit template
       3. Generate from table             Re-edit template
       4. Generate/Replace             /  Create audit trail (Option fixed)
  F1=Help      F2=Split     F3=Exit      F4=Expand    F7=Backward  F8=Forward
  F9=Swap     F10=Left     F11=Right    F12=Cancel

See Db2 Edit panel. Enter the values shown in the figure, FMN0USR in the Owner field and '*' in the Name field.

Press Enter to display the Table/View/Alias Selection panel. See Table/View/Alias Selection panel.

Figure 2. Table/View/Alias Selection panel
  Process   Options   Utilities   Help
 ──────────────────────────────────────────────────────────────────────────────
 FM/Db2 (DFF2)             Table/View/Alias Selection                  Top of 8
 Command ===>                                                       Scroll CSR 
 8 rows fetched                                                     Format TABL
                                                 TABLE
        TABLE    TABLE                  DATABASE SPACE    OBJECT
 SEL    OWNER    NAME                   NAME     NAME     TYPE
        *        *                      *        *        *
 ----   #2--+--- #1--+----1----+----2-- #4--+--- #5--+--- #7--+-
 ****  Top of data  ****
        FMN0USR  Department-Info-Errors FMN0IVD  FMN9IVSR TABLE
 S      FMN0USR  Department-Information FMN0IVD  FMN0IVSD TABLE
        FMN0USR  Employee-Detail        FMN0IVD  FMN9IVSE TABLE
        FMN0USR  Employee-Detail-Copy   FMN0IVD  FMN9IVSC TABLE
        FMN0USR  Employee-Detail-Errors FMN0IVD  FMN9IVSR TABLE
        FMN0USR  VDEPT                  FMN0IVD  FMN0IVSD VIEW
        FMN0USR  VEMP                   FMN0IVD  FMN9IVSE VIEW
        FMN0USR  VHDEPT                 FMN0IVD  FMN0IVSD VIEW
 ****  End of data  ****


  F1=Help      F2=Zoom      F3=Exit      F4=CRetriev  F5=RFind     F6=RChange
  F7=Up        F8=Down      F9=Swap     F10=Left     F11=Right    F12=Cancel
Type 'S' against the Department-Information field in the table and press Enter. See Table Edit panel.
Figure 3. Table Edit panel
  Process   Options   Utilities   Help
 ──────────────────────────────────────────────────────────────────────────────
 FM/Db2 (DFF2)                     Table Edit                         Top of 16
 Command ===>                                                       Scroll CSR 
 TABLE FMN0USR.Department-Information                               Format TABL
        Department Code Department Name                      Manager Employee N
        #1              #2                                   #3
        CHARACTER(3)    VARCHAR(36)                          CHARACTER(6)
        PU>             <---+----1----+----2----+----3----+> <-N-+>
 ****** ****  Top of data  ****
 000001 S00             Spiffy Computer Service Division<    000010
 000002 P01             Planning Department<                 000020
 000003 I01             Information Center<                  000030
 000004 D01             Development Center<                  _
 000005 M10             Manufacturing Systems<               000060
 000006 A10             Administration Systems<              000070
 000007 S11             Support Services<                    000050
 000008 D11             Operations<                          000090
 000009 S12             Software Support<                    000100
 000010 B22             Singapore Branch Office<             _
 000011 B23             Manila Branch Office<                _
 000012 B24             Jakarta Branch Office<               _
  F1=Help      F2=Zoom      F3=Exit      F4=CRetriev  F5=RFind     F6=RChange
  F7=Up        F8=Down      F9=Swap     F10=Left     F11=Right    F12=Cancel
Type over the Manager Employee Number value in the second row, as shown in Table Edit panel (showing typeover Manager Employee number). Change the value to 'XXXXXX' and press PF3. See Table Edit panel (showing amended Manager Employee number) to see the FM/Db2 response when the PF3 (EXIT) key is pressed.
Figure 4. Table Edit panel (showing typeover Manager Employee number)
  Process   Options   Utilities   Help
 ──────────────────────────────────────────────────────────────────────────────
 FM/Db2 (DFF2)                     Table Edit                         Top of 16
 Command ===>                                                       Scroll CSR 
 TABLE FMN0USR.Department-Information                               Format TABL
        Department Code Department Name                      Manager Employee N
        #1              #2                                   #3
        CHARACTER(3)    VARCHAR(36)                          CHARACTER(6)
        PU>             <---+----1----+----2----+----3----+> <-N-+>
 ****** ****  Top of data  ****
 000001 S00             Spiffy Computer Service Division<    000010
 000002 P01             Planning Department<                 XXXXXX
 000003 I01             Information Center<                  000030
 000004 D01             Development Center<                  _
 000005 M10             Manufacturing Systems<               000060
 000006 A10             Administration Systems<              000070
 000007 S11             Support Services<                    000050
 000008 D11             Operations<                          000090
 000009 S12             Software Support<                    000100
 000010 B22             Singapore Branch Office<             _
 000011 B23             Manila Branch Office<                _
 000012 B24             Jakarta Branch Office<               _
  F1=Help      F2=Zoom      F3=Exit      F4=CRetriev  F5=RFind     F6=RChange
  F7=Up        F8=Down      F9=Swap     F10=Left     F11=Right    F12=Cancel
Figure 5. Table Edit panel (showing amended Manager Employee number)
  Process   Options   Utilities   Help
 ──────────────────────────────────────────────────────────────────────────────
 FM/Db2 (DFF2)                     Table Edit            Commit issued (Errors)
 Command ===>                                                       Scroll CSR 
 TABLE FMN0USR.Department-Information                               Format TABL
        Department Code Department Name                      Manager Employee N
        #1              #2                                   #3
        CHARACTER(3)    VARCHAR(36)                          CHARACTER(6)
        PU>             <---+----1----+----2----+----3----+> <-N-+>
 ****** ****  Top of data  ****
 000001 S00             Spiffy Computer Service Division<    000010
 =ERR R P01             Planning Department<                 XXXXXX
 000003 I01             Information Center<                  000030
 000004 D01             Development Center<                  _
  ⋮
  F1=Help      F2=Zoom      F3=Exit      F4=CRetriev  F5=RFind     F6=RChange
  F7=Up        F8=Down      F9=Swap     F10=Left     F11=Right    F12=Cancel

The change to the Manager Employee Number could not be saved. The row in error is marked with '=ERR R'. Overtype 'e' in the prefix area for this row and press Enter. See Table Edit with amended Manager Employee number.

Figure 6. Table Edit with amended Manager Employee number
  Process   Options   Utilities   Help
 ──────────────────────────────────────────────────────────────────────────────
 FM/Db2 (DFF2)                     Table Edit            Commit issued (Errors)
 Command ===>                                                       Scroll CSR 
 TABLE FMN0USR.Department-Information                               Format TABL
        Department Code Department Name                      Manager Employee N
        #1              #2                                   #3
        CHARACTER(3)    VARCHAR(36)                          CHARACTER(6)
        PU>             <---+----1----+----2----+----3----+> <-N-+>
 ****** ****  Top of data  ****
 000001 S00             Spiffy Computer Service Division<    000010
 E RR R P01             Planning Department<                 XXXXXX
 000003 I01             Information Center<                  000030
 000004 D01             Development Center<                  _
  ⋮
  F1=Help      F2=Zoom      F3=Exit      F4=CRetriev  F5=RFind     F6=RChange
  F7=Up        F8=Down      F9=Swap     F10=Left     F11=Right    F12=Cancel
FM/Db2 displays the error panel shown in Db2 Save Error Action panel. Type the REDIT command on the command line, and press Enter. See Table Edit (related) panel to display the parent table for the relationship.
Figure 7. Db2® Save Error Action panel
  Process   Help
 ──────────────────────────────────────────────────────────────────────────────
 FM/Db2 (DFF2)               Db2 Save Error Action
 Command ===>                                                                  

 Db2 reported a No Primary Key error while attempting to save this row.  See
 below for key column details.

 Relationship    : Manager must be Employee
 Parent table    : FMN0USR.Employee-Detail
 Dependent table : FMN0USR.Department-Information

 Explanation: The insert or update operation on this line would have resulted
 in a foreign key value for which there is no corresponding primary key value.

 Instructions: Type REDIT on the command line to edit the parent table shown
 above.  Press ENTER or enter EXIT to return to the edit session and correct
 the error.  Press the CANCEL key to terminate the edit session.  Any changes
 made since the last commit point will be lost.

 Parent Column Name   Depndnt Column Name  Value
 Employee Number      Manager Employee Num XXXXXX
  F1=Help      F2=Split     F3=Exit      F4=Expand    F7=Backward  F8=Forward
  F9=Swap     F10=Left     F11=Right    F12=Cancel
Figure 8. Table Edit (related) panel
  Process   Options   Utilities   Help
 ──────────────────────────────────────────────────────────────────────────────
 FM/Db2 (DFF2)                Table Edit (related)                 Parent table
 48 rows - End of object.                                           Format TABL
        Employee Number First Name   Middle Initial Last Name       Work Depart
        #1              #2           #3             #4              #5
        CHARACTER(6)    VARCHAR(12)  CHARACTER(1)   VARCHAR(15)     CHARACTER(3
        PU--+>          <---+----1-> -              <---+----1----> <-N
 ****** ****  Top of data  ****
 000001 000010          Xena<        B              Howard<         S00
 000002 000020          Michelle<    J              Jackson<        P01
 000003 000030          James<       Z              Jones<          I01
 000004 000050          Jo-anne<     G              Gratten<        S11
 000005 000060          Jackson<     P              Costello<       M10
 000006 000070          Charles<     A              Abercrombie<    A10
 000007 000090          Eleni<                      MacMahon<       D11
 000008 000100          Junichi<     K              Funahashi<      S12
 000009 000110          Luigi<       V              Andretti<       S00
 000010 000120          Patrick<     O              O'Farrelly<     S00
 000011 000130          Megumi<                     Takami<         I01
 Command ===>                                                       Scroll CSR
  F1=Help      F2=Zoom      F3=Exit      F4=CRetriev  F5=RFind     F6=RChange
  F7=Up        F8=Down      F9=Swap     F10=Left     F11=Right    F12=Cancel

Press PF3 to exit from the FM/Db2 edit session of the Employee-Detail table and return to the FM/Db2 edit session of the Department-Information table. Press PF12 (CANCEL) to return to the FM/Db2 Editor function entry panel. A pop-up panel is displayed asking for confirmation to cancel the operation. Press Enter to continue.