Create a new DB2 environment

This section describes the steps that are required to define your CICS® IA DB2® database, and how to review and submit the sample jobs that you configured in the previous section.

When you have run the configuration utility to define your DB2 environment variables you should have the following output data sets.
  • hlq.SCIUSAMP.DB2
  • hlq.SCIUSQL.DB2
  • hlq.SCIUDAT1.DB2
  • hlq.SCIUDAT2.DB2
The data set hlq.SCIUSAMP.DB2 contains the sample jobs that are required to define and maintain your CICS IA DB2 environment.

Step 1 - Creating the IA DB2 database

To create the CICS IA database, follow these steps:
  1. Review sample job CIUDBCQ in hlq.SCIUSAMP.DB2.
  2. Review the associated SQL member, CIUMAIN, in hlq.SCIUSQL.DB2.
  3. Run sample job CIUDBCQ to create the database objects.

If you are creating the database on DB2 V9 or later, follow these steps to create the DB2 Stored procedures::

  1. Review sample job CIUDBCP1 in hlq.SCIUSAMP.DB2.
  2. Review the associated SQL member, CIUSPDL1, in hlq.SCIUSQL.DB2.
  3. Run sample job CIUDBCP1 to create the database objects. This job should complete with return code 0.
If you are creating the database on DB2 V8 or earlier, follow these steps to create the DB2 Stored procedures: :
  1. Review sample job CIUDBCP2 in hlq.SCIUSAMP.DB2.
  2. Review the associated SQL member, CIUSPDL2, in hlq.SCIUSQL.DB2.
  3. Run sample job CIUDBCP2 to create the database objects. This job should complete with return code 0.

Step 2 - Binding the IA DB2 packages

  1. Review sample job CIUDBNB in hlq.SCIUSAMP.DB2.
  2. Review the associated SQL member, CIUGRNTB, in hlq.SCIUSQL.DB2. This sample member includes sample SQL to grant a RACF® group or user ID access to the CICS IA plans. It is used in the STEP 3 of the sample job.
  3. Run sample job CIUDBNB to bind the DB2 batch programs that are used by CICS IA sample jobs and to grant access to the bound plan. This job completes with a return code of 0.

Step 3 - Loading static DB2 tables

CICS IA uses the following static tables.
CIU_VERSION
The CIU_VERSION table contains CICS IA Version and Service information and is used by the CICS IA plug-in for CICS Explorer®.
  • To load the version table, review and run job hlq.SCIUSAMP.DB2(CIUVERLD). This job completes with a return code of 0
CIU_TRANSLATORS
The CIU_TRANSLATORS table contains a one to one relationship between the IBM® program component numbers for compilers, translators, and linkage editors and a description for each component.
  • To load the translator table, review and run job hlq.SCIUSAMP.DB2(CIUTLOAD). This job completes with a return code of 0.
CIU_THREADSAFE_CMD
The CIU_THREADSAFE_CMD table contains information on whether an EXEC CICS command is threadsafe or not, for each version of CICS TS. It is used by the threadsafe report program and stored procedure to determine whether a command is threadsafe.
  • To load the threadsafe table, review and run job hlq.SCIUSAMP.DB2(CIUTSLOD). This job completes with a return code of 0.
CIU_TRUEEXIT_INFO
The CIU_TRUEEXIT_INFO table contains a one to one relationship between the CICS TRUEs that are used in your environment and a description for each TRUE. This table is used by the CICS IA plug-in for CICS Explorer.
  • To add your own TRUEs to the table, edit and save hlq.SCIUDAT2.DB2(CIUTRCD).
  • To load the TRUE exit table, review and run job hlq.SCIUSAMP.DB2(CIUTRLOD). This job completes with a return code of 0.

Step 4 - DB2 stored procedures set up

CICS IA uses DB2 Stored Procedures to run complex DB2 tasks.

If you are running DB2 V910 or later the CICS IA uses Native DB2 stored procedures, as defined in Step 1 - Creating the IA DB2 database.

If you are running DB2 V810 or earlier, then CICS IA uses external stored procedures, as defined in Step 1 - Creating the IA DB2 database.

External DB2 stored procedures run in a started task that is called WLM (Workload Manager) associated with each DB2 subsystem. Sample JCL for a WLM started task can be found in hlq.SCIUSAMP.DB2(CIUSPTSK). If you already have a DB2 WLM task, you need to add the CICS IA load library hlq.SCIULOAD to the STEPLIB concatenation in this JCL.
Note: The name of the started task must match the one supplied in the CICS IA configuration variable DB2 WLM PROCEDURE NAME.

For more information about implementing DB2 Stored Procedures, see the DB2 for z/OS® Administration Guide.