In the CICS® DB2® environment, each thread into DB2 runs under a thread task control block (TCB). The nature of these TCBs differs depending on whether CICS is connected to DB2 Version 5 or earlier (and so is not using the open transaction environment), or to DB2 Version 6 or later (and so is using the open transaction environment). See Overview: How threads work for an overview of thread TCBs and an explanation of the difference. This section provides further technical information about thread TCBs, to assist with problem determination.
When CICS is connected to DB2 Version 5 or earlier, the thread TCBs are specially created "daughter" subtasks of a CICS DB2 attachment facility subtask (the MSUB TCB) that is established when CICS connects to DB2. The MSUB TCB is a subtask of the main CICS TCB (the QR TCB), and hence the thread TCBs are "grand daughters" of the main CICS TCB. The CICS DB2 attachment facility runs on the QR TCB. It uses module DFHD2MSB, running on the MSUB TCB, to control the subtask thread TCBs.
The number of subtask thread TCBs allowed is controlled using the TCBLIMIT attribute of the DB2 connection definition (DB2CONN). A subtask thread TCB is not terminated when the thread is terminated. A subtask thread TCB can be terminated if:
When CICS is connected to DB2 Version 6 or later, the thread TCBs are open L8 mode TCBs. The open TCBs are "daughters" of the main CICS TCB (the QR TCB). The CICS DB2 task-related user exit itself runs on the open TCB, as well as using it to run the thread. The task-related user exit uses the CICS DB2 attach module DFHD2D2 to invoke DB2 when it needs to acquire a thread. Another module, DFHD2CO, running on a different TCB, deals with aspects of the overall CICS DB2 connection, including identifying to DB2 and disconnecting CICS from DB2.
The maximum number of open TCBs that can be running threads into DB2 at any one time is controlled using the TCBLIMIT parameter of the DB2CONN. An open TCB running a thread is not terminated when the thread is terminated. An open TCB can be terminated if: