Step 8. Use the ZDT/Db2 Import 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 Import options as shown in Figure 1. Enter '0.3.6' on the ZDT/Db2 main menu to access the "Import Options" panel.
Figure 1. Import Options panel
  Process   Options   Utilities   Help
 ──────────────────────────────────────────────────────────────────────────────
 ZDT/Db2 (DFF2)                   Import Options                 Global Settings
 Command ===>                                                                  

 Import dataset:
    Data format
    1  1. ZDT/Db2 (SQLDA) format
       2. Db2 UNLOAD format
       3. DSNTIAUL format
       4. User defined

 Import Options:
    Duplicate key processing              Enter "/" to select option
    1  1. Ignore                             Delete existing rows
       2. Update
       Max duplicates   ALL       

 Auto Commit (Changes):
    Auto-commit count . 0         


  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 Import function by typing '3.6' on the ZDT/Db2 main menu and pressing Enter.

Enter these values on the ZDT/Db2 Import "From" panel (See Figure 2):

Note: The template data set and member name should match the values you entered in Step 7. Use the ZDT/Db2 Export function.
Figure 2. Import Utility panel
  Process   Options   Utilities   Help
 ──────────────────────────────────────────────────────────────────────────────
 ZDT/Db2 (DFF2)                   Import Utility
 Command ===>                                                                  

 From Partitioned, Sequential or VSAM Data Set:
    Data set name . . . EXPORT.EMPDET                                 
    Member  . . . . . .         
    Volume  . . . . . .       
    Start position  . . 1         
    Import count  . . . ALL           Number of rows to import

 From Copybook or Template:
    Data set name . . . HFM.TEMPLATE                                  
    Member  . . . . . . EMPUL   

 Processing Options:
    Template usage                     Enter "/", "A"lways to select option
    1  1. Above                           Edit options
       2. Previous                        Edit template


  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 ZDT/Db2 Import "To" panel.

Type 'HFM0USR' and 'Employee-Detail-Copy' on the ZDT/Db2 Import "To" field panel as shown in Figure 3. Press Enter to start the Import process. The "Import Report" panel is displayed. See Figure 4.
Figure 3. IMPORT From panel
  Process   Options   Utilities   Help
 ──────────────────────────────────────────────────────────────────────────────
 IMPORT      From PERTHAP.EXPORT.EMPDET
 Command ===>                                                                  

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

 To Template:                      From  PERTHAP.TEMPLATE(EMPUL)
    Data set name . . .                                               
    Member  . . . . . .         

 Processing Options:
    Template usage                     Enter "/", "A"lways to select option
    3  1. Above                           Edit options
       2. Previous                        Edit template mapping
       3. Generate from table             Batch execution
       4. Generate/Replace
                                          Use REXX proc
                                          REXX proc name  . .         
  F1=Help      F2=Split     F3=Exit      F4=Expand    F7=Backward  F8=Forward
  F9=Swap     F10=Left     F11=Right    F12=Cancel
Figure 4. Import Report panel
  Process   Options   Utilities   Help
 ──────────────────────────────────────────────────────────────────────────────
 ZDT/Db2 (DFF2)                   Import Report                 48 rows imported
 Command ===>                                                                  
                                                                    More:     +
 Source and target:
    Source dataset  . . : 'PERTHAPC.EXPORT.EMPDET'
    Db2 object  . . . . : HFM0USR.Employee-Detail-Copy
 Rows imported:
    Records read (Start, First error) . . . : 43 (1)
    Committed (successful) changes  . . . . : 0
    Uncommitted (unsuccessful) changes  . . : 0
    Total successful changes  . . . . . . . : 0
 Row update not selected



 Errors:
    Duplicate keys/Max duplicates . . . . . : 0/NO LIMIT
    Updates . . . . . . . . . . . . . . . . : 0
    Record selection  . . . . . . . . . . . : 43
    Dropped (REXX proc) . . . . . . . . . . : 0
  F1=Help      F2=Split     F3=Exit      F4=Expand    F7=Backward  F8=Forward
  F9=Swap     F10=Left     F11=Right    F12=Cancel

You can use the ZDT/Db2 editor to display the contents of the HFM0USR."Employee-Detail-Copy" table.