Step 6. Use the ZDT/Db2 Copy function

Log on to ZDT/Db2, and connect to the same Db2® system specified in Step 1. Define Db2 objects to be used during verification.

Set the Copy options as shown in Figure 1. Enter '0.3.3' on the ZDT/Db2 main menu to access the "Copy Options" panel.

Note that the "Create audit trail" option may not be displayed, or may be displayed with different text, depending on choices made during the product install. The auditing setting does not affect the IVP.
Figure 1. Copy Options panel
  Process   Options   Utilities   Help
 ──────────────────────────────────────────────────────────────────────────────
 ZDT/Db2 (DFF2)                    Copy Options                  Global Settings
 Command ===>                                                                  

 From Table Concurrency Option:        To Table Locking Option:
    Enter "/" to select option            Locking
       Use uncommitted read               1  1. None
                                             2. Share mode
                                             3. Exclusive mode

 Processing Options:
    Duplicate key processing              Enter "/" to select option
    1  1. Ignore                             Delete existing rows
       2. Update                             Ignore RI/Constraint errors
       Max duplicates   ALL                  Native unicode processing
                                          /  Create audit trail (Option fixed)





  F1=Help      F2=Split     F3=Exit      F7=Backward  F8=Forward   F9=Swap
 F12=Cancel

Return to the ZDT/Db2 main menu by pressing PF3. Select the ZDT/Db2 "Copy function" by typing '3.3' on the ZDT/Db2 main menu and pressing Enter.

Type 'HFM0USR' and 'Employee-Detail' on the "From Db2 Object" field as shown in Figure 2. Press Enter to show the COPY "To" field in the panel.
Figure 2. Copy Utility panel
  Process   Options   Utilities   Help
 ──────────────────────────────────────────────────────────────────────────────
 ZDT/Db2 (DFF2)                    Copy Utility
 Command ===>                                                                  

 From Db2 Object:
    Location  . . . . .                      Database  . . .          (optional)
    Owner . . . . . . . HFM0USR           +  Table Space . .          (optional)
    Name  . . . . . . . Employee-Detail                                        +

    Copy count  . . . . ALL            Number of rows to copy

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

 Processing Options:
    Template usage                     Enter "/", "A"lways to select option
    3  1. Above                           Edit template
       2. Previous                        Copy panel values
       3. Generate from table          /  Create audit trail (Option fixed)
       4. Generate/Replace
  F1=Help      F2=Split     F3=Exit      F4=Expand    F7=Backward  F8=Forward
  F9=Swap     F10=Left     F11=Right    F12=Cancel
Type 'HFM0USR' and 'Employee-Detail-Copy' on the ZDT/Db2 COPY "To" field panel, and select the "Batch execution" option under the "Processing Options" field, as shown in Figure 3.
Figure 3. Basic SELECT Prototyping panel (2)
  Process   Options   Utilities   Help
 ──────────────────────────────────────────────────────────────────────────────
 COPY        From HFM0USR.EMPLOYEE-DETAIL
 Command ===>                                                                  

 To Db2 Object:
    Location  . . . . .                      Database  . . .          (optional)
    Owner . . . . . . . HFM0USR           +  Table Space . .          (optional)
    Name  . . . . . . . Employee-Detail-Copy                                   +

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

 Processing Options:
    Template usage                     Enter "/", "A"lways to select option
    3  1. Above                           Edit copy options
       2. Previous                        Edit template mapping
       3. Generate from table          /  Batch execution
       4. Generate/Replace


  F1=Help      F2=Split     F3=Exit      F4=Expand    F7=Backward  F8=Forward
  F9=Swap     F10=Left     F11=Right    F12=Cancel

Press Enter to display the generated JCL for the ZDT/Db2 batch copy job.

Review the generated JCL. It should not be necessary to change the STEPLIB DD statements if the correct Db2 libraries are specified in the HFM2SSDM macro entry for the currently connected Db2 system.

Submit the job. The expected return code is RC=0, with 48 rows copied.

You can examine the data copied to the "Employee-Detail-Copy" table using the ZDT/Db2 editor. Note that the columns are similar to those in the "Employee-Detail" table, but are in a different order.