Overview: Enabling CICS application programs to access DB2

A CICS® application program that accesses DB2® must be prepared in the same way as a normal CICS application program, and must also go through DB2's bind process to produce an application plan.

About this task

The DB2 bind process produces an application plan (often just called a “plan”). Each plan contains the bound form of all the SQL statements from the application programs that use it, and it allows those application programs to access DB2 data at run time.

The plans are held in DB2, and each thread into DB2 relates to a plan. The plan that each type of thread uses is named on the DB2CONN definition (for pool threads) or the thread's DB2ENTRY definition (for entry threads). The plan for a particular type of thread must contain the bound form of the SQL statements from all the application programs that use that type of thread to access DB2. You can either name the plan explicitly or name a dynamic plan exit. A dynamic plan exit is a routine that determines which plan to use for the transaction that has requested a thread of that type.