PART V - DB2 AND CICS - IBM Mainframe

CICS or 'Customer Information Control System' is a database/data communication control system. You can access DB2 data form CICS programs. When DB2 data is accessed form CICS, multiple threads can be active simultaneously, enabling concurrent access to a DB2 subsystem by multiple users of a CICS region. A mechanism called CICS Attachment Facility connects CICS with DB2. Using this facility, each CICS region can be connected to only one DB2 subsystem at a time. Each subsystem can however be connected to more than one CICS region at a time.

CICS Tables

CICS uses certain control tables to administer its on-line environment. These tables control the availability of CICS resources and direct CICS to operate in specific ways. Based on the values registered in these tables CICS can be customized to the user's needs. The important table that affect the CICS/DB2 application programs are given below:

  • Processing Program Table (PPT). CICS programs and BMS maps are registered in this table. If the program or map is nit in this table CICS will not execute those programs/maps. For programs the name in the PPT should be the same as the name of the load module.
  • Program Control Table (PCT). It is to register CICS transactions. CICS reads this table to identify and initialize transactions. All transactions must be registered here.
  • File Control Table (FCT). This table holds the list and properties of all files used by the programs. This does not apply to DB2 tables. But usually in a CICS/DB2 program no files are used.
  • Resource Control Table (RCT). When a DB2 program will run under CICS an additional table called RCT must be populated. The RCT applies only to CICS transactions that access DB2 data. It defines the manner in which DB2 resources will be utilized in CICS transactions. RCT defines a plan for each transaction that can access DB2. It also defines the number of threads available for application plans and the DB2 command processor.

DB2-CICS Execution

DB2-CICS Execution

Execution of a DB2-CICS Program

Execution of a DB2-CICS Program

CICS/DB2 Programs

CICS provides an interface to DB2, but DB2 requires its own region independent of the CICS region. Therefore the way of interfacing is different form that of DL/I. Both CICS and DB2 require its own unique regions under the operating system. In order to make an interface between CICS and DB2, DB2 has a special facility called CICS Attachment Facility, which connects DB2 to CICS. CICS application programs can issue a set of commands for SQL services in order to access the DB2 database.

CICS/DB2 Programs

Where 'function' is an SQL function and 'options' are the options of the SQL service. The application programs, which contain EXEC SQL statements, must be Pre-complied using the DB2 Pre-compiler, which translates the SQL command into COBOL statements. Although CICS translator does not reject the SQL commands as syntax error, the translation time is reduced if the program is pre-compiled first. So the execution of a DB2-CICS program.

The SQL commands that can be used in a CICS application programs are SELECT, FETCH, UPDATE, DELETE and INSERT.


All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

IBM Mainframe Topics