Preparing a CICS application program that accesses DB2

A CICS application program that access DB must be put through a number of processes to build a DBRM and create the application load module before it enters the bind process.

About this task

Figure 1 shows the steps in preparing a CICS application program to access DB2.

The first step is to put the program through the DB2 precompiler. The DB2 precompiler builds a database request model (DBRM) that contains information about each of the program's SQL statements.

The second, third and fourth steps are the normal process for preparing any CICS application program, whether or not it accesses DB2. The second step is to put the program through the CICS command language translator. The third step is to compile or assemble the program. The fourth step is to link-edit the program with the necessary interfaces (including the CICS DB2 language interface module DSNCLI). The end product of Steps 2, 3 and 4 is an application load module that enables the program to run. For more information on these steps, see CICS DB2 program preparation.

An extra step is required to enable the program to use the information in the DBRM that was created in Step 1. This fifth step is the bind process. The bind process requires DB2, and it uses the DBRM to produce an application plan that enables the program to access DB2 data. See The bind process for an explanation of the bind process.

If you are using one of the Language Environment®-conforming compilers for COBOL and PL/I, you can combine some of these steps into a single task, because these compilers have integrated the CICS command language translator, and (depending on your version of DB2) an SQL statement coprocessor. See CICS DB2 program preparation for more information.

Figure 1. Steps to prepare a CICS application program that accesses DB2
The text above explains this diagram in full.