CICS DB2 program preparation steps

The steps shown in Figure 33 summarize how to prepare your program for execution after your application program design and coding is complete.

Figure 33. Steps to prepare a CICS application program that accesses DB2
 You can either prepare the application program using DB2I (DB2 Interactive Interface), or submit your own JCL for batch processing. The preparation steps are as follows. Step 1: DB2 precompiler. The  DB2 precompiler builds a DBRM (database request module) that contains information about each of the program's SQL statements. The program then passes to Step 2. Step 2: CICS command language translator. Step 3: Compile or assemble program. Step 4: Link-edit with interfaces. The end product of Steps 2, 3 and 4 is an application load module. An extra step is required to enable the program to use the information in the DBRM that was created in Step 1. This extra step is Step 5: Bind process. The bind process requires DB2, and it uses the DBRM to produce an application plan (often just called a plan) that enables the program to access DB2 data.

For an overview of the stages in this process, see Preparing a CICS application program that accesses DB2.

When you prepare CICS® application programs that access DB2®:

Table 9 shows the tasks that you need to perform to prepare a CICS DB2 program, depending on the language of the program and on your version of DB2:

Table 9. Tasks to prepare a CICS program that accesses DB2
DB2 version and program language Step 1 (SQL statement processing) Step 2 (CICS command translation) Step 3 (Program compile) Step 4 (Link-edit) Step 5 (Bind)
DB2 V6 and Assembler DB2 precompiler CICS-supplied separate translator Language compiler Link-edit with EXEC interface and DSNCLI Bind process
DB2 V6 and PL/I DB2 precompiler Language compiler that supports integrated CICS translator Link-edit with EXEC interface and DSNCLI Bind process
DB2 V6 and COBOL DB2 precompiler Language compiler that supports integrated CICS translator Link-edit with EXEC interface and DSNCLI Bind process
DB2 V6 and other languages DB2 precompiler CICS-supplied separate translator Language compiler Link-edit with EXEC interface and DSNCLI Bind process
DB2 V7 or V8 and Assembler DB2 precompiler CICS-supplied separate translator Language compiler Link-edit with EXEC interface and DSNCLI Bind process
DB2 V7 or V8 and PL/I Language compiler that supports integrated CICS translator and SQL statement coprocessor Link-edit with EXEC interface and DSNCLI Bind process
DB2 V7 or V8 and COBOL Language compiler that supports integrated CICS translator and SQL statement coprocessor Link-edit with EXEC interface and DSNCLI Bind process
DB2 V7 or V8 and other languages DB2 precompiler CICS-supplied separate translator Language compiler Link-edit with EXEC interface and DSNCLI Bind process

You can perform this program preparation using the DB2 Interactive Interface (DB2I) or by submitting your own JCL for batch execution.

If you perform this process while CICS is running, you may need to issue a CEMT NEWCOPY command to make the new version of the program known to CICS.

CICS SQLCA formatting routine

DSNTIAR, the IBM®-supplied SQLCODE message formatting procedure, lets you send a sort of "SQL messages online" to your application.

With DB2 Version 3 Release 1, DSNTIAR was split into two front-end modules (DSNTIAC and DSNTIAR) and a run-time module (DSNTIA1). DSNTIAC is used for CICS applications and DSNTIAR for other DB2 interfaces. This change removed the need, previous to DB2 3.1, to relink-edit your application modules every time a change is made to DSNTIAR, either by change of release or by applying maintenance. If you have applications that have previously been link-edited with DSNTIAR, you should consider link-editing them again using DSNTIAC instead, which will provide performance improvments and isolate them from changes to DSNTIAR.

The CICS front-end part, DSNTIAC, is supplied as a source member in the DB2 library SDSNSAMP.

The necessary program definitions for DSNTIAC and DSNTIA1 are provided in IBM supplied group DFHDB2 on the CSD. You must add the SDSNLOAD library to the CICS DFHRPL concatenation (after the CICS libraries) so that DSNTIA1 can be loaded.

Related concepts
Preparing CICS DB2 programs for execution and production
The CICS DB2 test environment
What to bind after a program change
Bind options and considerations for programs
CICS DB2 program testing and debugging
Going into production: checklist for CICS DB2 applications
Tuning a CICS application that accesses DB2
[[ Contents Previous Page | Next Page Index ]]