CICS TS for OS/390 comes with an attachment facility that allows you to operate DB2 with CICS. The DB2 system can be shared by several CICS systems, but an individual CICS system can only be connected to a single DB2 system at a time. The CICS DB2 attachment facility provides the following major functions:
1. An Application Program Interface (API) that allows you to operate DB2 with CICS
2. Attachment commands that display and control the status of the attachment facility
The attachment commands are issued using the CICS-supplied DSNC transaction ID, include:
l STRT—start the connection to DB2
l STOP—stop the connection to DB2
l DISP—display the status of the connection to DB2
l MODI—modify the characteristics of connection to DB2
l DISC—disconnect threads
CICS application programs make requests to DB 2 in the form of SQL statement. When a CICS application program issues a SQL request, the CICS resource manager processes the request and passes control to the CICS attachment facility.
A transaction thread is scheduled by the attachment facility. DB2 checks the authorization for the request and creates control blocks for it.
When the SQL request completes, DB2 passes data back to the CICS attachment facility, and the CICS application program regains control.
Use RDO to declare a particular DB2 database available to CICS TS system.. It has advantages as below:
1. Defining database resource online means that you do not have to shut down the CICS-DB2 attachment facility in order to make changes to CICS-DB2 resource. This allows for continuous availability for both systems
2. Using RDO to define DB2 resources as CICS-managed resource also has the advantage of providing a consistent end-user interface. This means that users can use familiar CICS transaction identifiers to perform tasks such as installing and manipulating database entries.