Step 1. Define Db2 objects to be used during verification

The first step in the ZDT/Db2 verification is to define the Db2® objects to be used.

Take a copy of the sample IVP member HFM2VER from the sample library.

Note: The figures in this chapter are from a Db2 version 10 system. If you run the IVP against a later Db2 version there might be minor differences in the names of the Db2 objects.

Follow the instructions at the top of the sample. You need to review, and possibly change, the following values:

SG name
Change this to the name of a Db2 storage group of your choice. You can use an existing Db2 storage group name. To do this, change SG_name to the existing storage group name, and comment out the CREATE STOGROUP statement. If you use an existing Db2 storage group name, you can skip the customization for Vol_list and DB2_VCAT_name.
VOL_list
Change this, if required, to a list of valid disk volume names.
DB2_VCAT_name
Change this to the VCAT name used for Db2 user data sets, for the appropriate Db2 system.

To execute the DDL statements:

  1. Log on to a TSO user ID that is enabled to access and use ZDT/Db2.
  2. Start ZDT/Db2.
    • If you have added an option for ZDT/Db2 to your ISPF Primary Options menu (see Adding ZDT/Db2 to the ISPF menu), type this option value, and press Enter. For example, if you have assigned ZD to ZDT/Db2, type ZD and then press Enter.
    • If you defined ZDT/Db2 in an ISPF command table (see Defining ZDT/Db2 in an ISPF command table), verify that ZDT/Db2 can be started by entering the command ZD on any ISPF command line.
  3. If you have previously selected a Db2 subsystem, you immediately see the Primary Option Menu.

    If this is the first time you have used ZDT/Db2:

    • The Copyright panel appears. After reading the panel text, press the Cancel key, PF12. In subsequent sessions this panel does not automatically appear.
    • The Db2 Subsystem Selection menu is displayed, showing the Db2 subsystems you customized in your HFM2SSDM macro. Select the Db2 subsystem you want to use, or run the ZDT/Db2 IVP against, and press Enter to go to the ZDT/Db2 Primary Option Menu.
  4. Enter VER on the command line to display the release level and PTF level of ZDT/Db2. A panel is displayed that gives you, as example, the following information:
    HCL Z Data Tools Version 1 Release 1 Modification 0
    Db2 Component
    (not APF authorized)
    
    Service Levels of installed components
    
                 Base       IMS        Db2        CICS
    English      -NONE-     -NONE-     -NONE-     -NONE-
    • ZDT/Db2 is always shown as APF not authorized, even if you have made Z Data Tools APF-authorized, as Z Data Tools cannot run as APF-authorized under ISPF.
    • When you first install Z Data Tools, -NONE- is shown against each component. Subsequently, when you have applied service to Z Data Tools, a PTF number is shown, indicating the PTF level of each component you have installed. If you have not installed a component, that component is not be shown at all.
  5. Select the ZDT/Db2 system options by typing '0.0.2' on the ZDT/Db2 main menu panel and pressing Enter. See Figure 1. Ensure that:
    • The "Translate Db2 object names" option is not selected.
    • The "Translate input SQL statements" option is not selected.
  6. Press PF3 to return to the ZDT/Db2 main menu.
    Figure 1. ZDT/Db2 System Options panel
      Process   Options   Utilities   Help
     ──────────────────────────────────────────────────────────────────────────────
     ZDT/Db2 (DFF2)          ZDT/Db2 System Options (1 of 4)          Global Settings
     Command ===>                                                                  
    
     Uppercase Translation:
        Enter "/" to select option
           Translate Db2 object names
           Translate input SQL statements
    
     Encapsulation of SQL Identifiers in Double Quotes:
        Use double quotes
        3  1. For Db2 SQL reserved words
           2. For IBM and Db2 SQL reserved words
           3. Always
    
     More Options:
        Enter "/" to select option
        /  Arbitrary select statements, time display format, template creation
        /  CCSID warning option
        /  Editor choice for viewing output data, members
    
      F1=Help      F2=Split     F3=Exit      F7=Backward  F8=Forward   F9=Swap
     F11=NxtPage  F12=Cancel
  7. Select the "Edit/Execute SQL (Data Set)" function by typing '4.4' on the ZDT/Db2 main menu panel and pressing Enter.

    See Figure 2.

    Enter a data set name, member name, and execution options, as shown in Figure 2. Modify the data set and member names to reflect the data set and member name containing your modified copy of the HFM2VER sample.

    Figure 2. Edit/Execute SQL (Data Set) panel
      Process   Options   Utilities   Help
     ──────────────────────────────────────────────────────────────────────────────
     ZDT/Db2 (DFF2)            Edit/Execute SQL (Data Set)
     Command ===>                                                                  
    
     Input Data Set:
        Data set name . . . 'HFM.V1R1M0.IVP'                             
        Member  . . . . . . HFM2VER
        Volume  . . . . . .       
    
     SELECT statement options:
        Row count . . . . . ALL            Number of rows to browse
    
     Processing Options:
        Execution options                  Enter "/" to select option
        1    First column                  /  Edit data set
        72   Last column                   /  Execute SQL from data set
        --   Comment chars                    Re-edit data set after execution
    
    
    
    
      F1=Help      F2=Split     F3=Exit      F7=Backward  F8=Forward   F9=Swap
     F12=Cancel
  8. Press Enter to edit the sample DDL. When you have made any required changes, press PF3 to run the DDL statements.

    When the DDL samples run successfully, two SQL warning messages are displayed. See Figure 3 and Figure 4. These warnings are expected. To continue running, press Enter.

    Figure 3. SQL Warning (1) panel
      Process   Options   Utilities   Help
     ─ ┌───────────────────────── SQL Warning Encountered ─────────────────────────┐
     F | Command ===>                                                              |
     C |                                                                           |
       |    SQLCODE : 162                            DSNTIAR CODE :  0             |
     I |                                                                           |
       |  DSNT404I SQLCODE = 162, WARNING:  TABLE SPACE HFM0IVD.HFM0IVSD HAS BEEN  |
       |           PLACED IN CHECK PENDING                                         |
       |  DSNT418I SQLSTATE   = 01514 SQLSTATE RETURN CODE                         |
       |  DSNT415I SQLERRP    = DSNXICRC SQL PROCEDURE DETECTING ERROR             |
     S |  DSNT416I SQLERRD    = 20  0  0  ─1  0  0 SQL DIAGNOSTIC INFORMATION      |
       |  DSNT416I SQLERRD    = X'00000014'  X'00000000'  X'00000000'              |
       |           X'FFFFFFFF'  X'00000000'  X'00000000' SQL DIAGNOSTIC            |
     P |           INFORMATION                                                     |
       |                                                                           |
       |    SQL Statement : ALTER TABLE HFM0USR."Department─Information" FOREIGN   |
       |  KEY "Department must have Admin" ("Administration Department") REFERENC  |
       | ES HFM0USR."Department─Information" ON DELETE CASCADE                     |
       |                                                                           |
       |                                                                           |
       |  F1=Help       F2=Split      F3=Exit       F5=SQL        F7=Backward      |
       |  F8=Forward    F9=Swap      F12=Cancel                                    |
       └───────────────────────────────────────────────────────────────────────────┘
     F12=Cancel
    Figure 4. SQL Warning (2) panel
      Process   Options   Utilities   Help
     ─ ┌───────────────────────── SQL Warning Encountered ─────────────────────────┐
     F | Command ===>                                                              |
     C |                                                                           |
       |    SQLCODE : 162                            DSNTIAR CODE :  0             |
     I |                                                                           |
       |  DSNT404I SQLCODE = 162, WARNING:  TABLE SPACE HFM0IVD.HFM0IVSD HAS BEEN  |
       |           PLACED IN CHECK PENDING                                         |
       |  DSNT418I SQLSTATE   = 01514 SQLSTATE RETURN CODE                         |
       |  DSNT415I SQLERRP    = DSNXICRC SQL PROCEDURE DETECTING ERROR             |
     S |  DSNT416I SQLERRD    = 20  0  0  ─1  0  0 SQL DIAGNOSTIC INFORMATION      |
       |  DSNT416I SQLERRD    = X'00000014'  X'00000000'  X'00000000'              |
       |           X'FFFFFFFF'  X'00000000'  X'00000000' SQL DIAGNOSTIC            |
     P |           INFORMATION                                                     |
       |                                                                           |
       |    SQL Statement : ALTER TABLE HFM0USR."Department─Information" FOREIGN   |
       |  KEY "Manager must be Employee" ("Manager Employee Number") REFERENCES F  |
       | MN9USR."Employee─Detail" ON DELETE SET NULL                               |
       |                                                                           |
       |                                                                           |
       |  F1=Help       F2=Split      F3=Exit       F5=SQL        F7=Backward      |
       |  F8=Forward    F9=Swap      F12=Cancel                                    |
       └───────────────────────────────────────────────────────────────────────────┘
     F12=Cancel

    When the SQL has run successfully, a box appears at the bottom of the screen with "173 statements executed".

Move onto Step 2. Run the HFM2CHCK sample job of the IVP.