Testing with IBM Db2 on z/OS systems

You can record and virtualize MVS™ batch and CICS® COBOL/PL/I DB2® programs on z/OS® with HCL OneTest™ API.
You can test, record, and virtualize SQL events from MVS batch and CICS COBOL/PL/I Db2 programs on z/OS in the same way as for other databases, with the following additional setup:
  • When you configure the physical view of the database connection, more information is required. Specify the mappings between the Host Name Alias and Subsystem IDs. For information about this mapping, see Configuring the physical database resource.
  • Before testing can begin, install, configure, and start both components of the CLIP agent. You can use the CLIP agent to manage communications between the COBOL/PL/I Db2 program and HCL OneTest API components. The CLIP agent front-end also provides the functions of the JDBC proxy. For an overview of the CLIP agent, see Understanding the Compiled Language Interception Processor (CLIP).
  • Do the following environment-specific tasks:
    • For applications that are to run under CICS, you must create CICS Application Debugging Profiles. These profiles are needed to determine which transactions are monitored for Db2 events. For information about creating a profile, see Setting up the CICS Db2 environment.
    • For applications that are to run under MVS batch, you must modify the JCL controlling the job. For information about the changes to the JCL that are needed, see Setting up the MVS Batch Db2 environment.

For general information about how to configure database resources and SQL tests in HCL OneTest API, see Database resources, connections, and bindings.

Supported environments

You can record and virtualize SQL events from COBOL/PL/I Db2 programs on z/OS only in these environments:
  • z/OS and MVS batch: Versions 2.1, 2.2
  • Db2: Versions 10.1, 11.1
  • CICS: Versions 4.1, 4.2, 5.1
  • COBOL: Versions 3.4, 4.1, 4.2, 5.1
  • PL/I: Version 4.3
With the exception of Rational Developer for System z Integrated Debugger or IBM Debug Tool for z/OS, the CLIP agent back-end cannot coexist with other Language Environment (LE)-based debuggers. For more information, see Configuring the CLIP agent back-end (probe) on z/OS.

You need either Db2 Connect or other software that provides the db2jcc_license_cisuz.jar file on the system that is running the CLIP agent front-end. The location of this file must be defined in the Library Manager. For details, see Adding the libraries for database testing using the Library Manager.

General limitations

  • JDBC driver of only IBM® Db2 (Universal) is supported.
  • You can use the JDBC driver even when the Oracle compatibility mode of a Db2 instance is turned on. However, the following limitations apply:
    • If a stored procedure has a parameter in FLOAT type, Db2 converts it to DOUBLE type. Hence, you must use DOUBLE type when setting input parameters and registering output parameters.
    • A user-defined array type cannot be used as the column type.
    • If HAVING and GROUP BY are used in the same SQL statement, GROUP BY must precede HAVING.
  • DBRM (database request module) files for the application must be made available to the CLIP agent.
    • In the application environment, you must set the AQE_DBG_DBRM z/OS environment variable to specify the dataset that contains the DBRM files.
    • Only DBRM with Entry Statement format 2 is supported, specified in DSNXNBRM.
    • The DBRM files must have the same name as the corresponding program name.
  • For CICS regions, specify the RENTPGM=NOPROTECT option in the system initialization table (SIT).
  • If the result set returned by a stored procedure is scroll-sensitive and dynamic, the JDBC virtualization cannot learn the stored procedure call.
  • For CALL statements for the JDBC proxy, enclose the parameters within parentheses.
  • The connection between the CLIP agent front-end and HCL Quality Server must use HTTP rather than HTTPS.

SQL statement and data type limitations

You cannot use these SQL statements and behaviors for recording, learning, or virtualization:
  • Set the sensitivity of the cursor more precisely
  • Use SQLDA structure to prepare and execute dynamic SQL
  • PREVIOUS VALUE FOR clause that can be used in select/insert/update
These features are not supported:
  • Learning with UPDATE/DELETE with cursor statement
  • Learning or virtualizing SELECT/INSTER/UPDATE statements that refer to columns that have data types:
    • TIMESTAMP(0)
    • BLOB file reference
    • CLOB file reference
    • DBCLOB file reference
    • XML BLOB file reference
    • XML CLOB file reference
    • XML DBCLOB file reference
    • Result set locator
    • Table locator
    • DBCLOB locator

Encoding limitations

The following encoding limitations apply for character-string host variables:
  • CLOB, DBCLOB, XML_CLOB, and XML_DBCLOB host variable data are interpreted as CCSID 37. All the other character string host variable types are interpreted by using CCSID defined in the DECLARE :HV1 VARIABLE CCSID ccsid SQL statement for that variable.
  • If the host variable has no associated DECLARE :HV1 VARIABLE CCSID ccsid SQL statement, it is interpreted by using the CCSID specified by the CODEPAGE compile option. It does not matter whether the application was compiled by using the CCSID0 option (for PL/I applications), the NOSQLCCSID option (for COBOL/PL/I applications), or both.
  • When DBCLOBs (database character large object) are interpreted as a single-byte CCSID (Coded Character Set Identifiers) containing an odd number of characters, a garbage character might be appended at the end. DBCLOB values in PL/I applications might be truncated to half of their original lengths.