CICS-DB2 thread processor DFHD2D2
The thread processor program DFHD2D2 is used only when operating with DB2® for z/OS® Version 6 and later, when the CICS-DB2 Attachment Facility uses CICS® open TCBs rather than privately managed subtask TCBs. In the Open Transaction environment (OTE), when connected to DB2 V9 or later, the CICS-DB2 TRUE will be enabled as CONCURRENCY(REQUIRED) API(CICSAPI) and run on any eligible key 8 open TCB. When connected to DB2 V8 or earlier, it is enabled as CONCURRENCY(REQUIRED) API(OPENAPI) and will run on an L8 TCB.
Instead of posting a subtask, DFHD2EX1 calls DFHD2D2. DFHD2D2 performs the same functions as performed by subtask program DFHD2EX3 in a non OTE environment; that is, issuing the identify, signon, create thread, terminate thread calls to DB2, plus the api and syncpoint calls to DB2.
DFHD2D2 is called through a subroutine domain call on which the address of the relevant connection control block (DFHD2CSB) is passed. On the first call of a unit of work, DB2 is called to "associate" the connection with the calling TCB. After this is done, calls to DB2 can proceed as normal. When a DB2 thread is released from a CICS transaction (typically at syncpoint), the connection is "dissociated" from the open TCB. Hence a connection control block (DFHD2CSB) has an affinity to an open TCB while it is associated. With DB2 for OS/390 Version 5 and earlier, a connection has a permanent affinity to its subtask TCB.