Previous Topic: Test IMS ApplicationsNext Topic: Test Data Generation


Test IBM DB2 Applications

To test IBM DB2 applications using your product in foreground, you can modify the TSO CLIST MR85CDB2, which invokes the application. You find MR85CDB2 in the CAICLIB data set. A sample batch execution of DB2 programs follows to give you some background into the DB2 commands DSN and RUN and how they relate to DB2 foreground execution.

Note: The instructions in this chapter are for debugging an application under Foreground, Option 1 on the Primary Option Menu. The suggested method for testing DB2 applications is using Option 5, Batch Link. For more information on batch link and about debugging your DB2 Stored Procedure, see the chapter "Batch Link Facility."

Note: If you are using the Call Attach Facility of DB2, you may use the MR85CLST CLIST to debug your application in foreground.

To run the DB2 program DSN8BC3 under CA InterTest™ Batch

  1. Modify the TSO CLIST MR85CDB2 by replacing INTBATCH with the data set prefix defined at install time.
  2. Verify that the application's ISPF Panel library is concatenated to the IBM ISPF panel library, ddname ISPPLIB, and the message library is concatenated to the IBM ISPF message library, ddname ISPMLIB.

For more information, see MR85CDB2 in the section Customize CLISTs of the chapter "Installation" of the Installation Guide.

To test a DB2 program (PAYROLL in this example), perform the following steps:

  1. EXEC the modified application CLIST. The following panel displays:

    --------------- CA InterTest™ Batch DB2 Panel ----------------------- Command ===> Release - r8.5 DB2 Subsystem Name ===> D510 Userid - USER01 Time - 12:38 Plan Name ===> DB2DEMO Date(G) 03/02/28 Date(J) - 03.059 Library Name ===> 'USER01.LOAD' Copyright (C) 2009 CA. All rights reserved.

  2. Complete the three fields on the CA InterTest™ Batch DB2 panel. Each field is defined in the following table:

Field

Description

DB2 Subsystem Name ===>

The name of the DB2 Subsystem where the program being tested runs.

Plan Name ===>

The DB2 Plan name for the program being tested.

Library Name ===>

The Load Library name where the program being tested resides.

  1. Press Enter after completing the panel fields. The Primary Option Menu displays.
  2. Select Option 1: Foreground. The Execution Control panel displays.
  3. Supply the main application program name and the required STEPLIB to execute the application. Press Enter to see the Monitor Control panel.
  4. On the Monitor Control panel, type in the names of the programs that you want to debug and DSNs of the PROTSYM files containing the symbolic information for the programs you want to debug. Press Enter to receive the *INITIAL* Intercept panel.
  5. Run the test session in the usual way.

    Notice that once you invoke CA InterTest™ Batch, there is no difference in the way the application is used to test DB2 programs.

    Note: This procedure does not let you end the program and return to the Execution Control panel to retest the same program. You must exit the application and rerun the CLIST (Step 1).

It is strongly suggested that you use the following approach when debugging in foreground with DB2 and CA InterTest™ Batch:

  1. Get CA InterTest™ Batch working for non‑DB2 programs.
  2. Get the DB2 program running under native TSO.
  3. Ensure that the DB2 program is correctly prepared as follows:
    1. DB2 pre‑processed
    2. Compiled and post processed into a PROTSYM file
    3. Linked
    4. A DB2 bind step or job is run for the recompiled program
    5. All other DB2 protocol is done
  4. Modify the application CLIST as explained previously.