MAXOPENTCBS

MAXOPENTCBS controls the total number of L8 and L9 mode TCBs that the CICS region can have in operation at any time. Within this limit, there are no constraints on how many of the TCBs in the pool are L8 TCBs, and how many are L9 TCBs.. These TCBS are used as follows:

When CICS is connected to DB2 Version 6 or later, the CICS-DB2 Attachment Facility operates with an OPENAPI task related user exit and hence uses L8 TCBs.

How dispatcher selects an L8 or L9 mode TCB

CICS dispatcher manages the pool of L8 and L9 mode TCBs up to the limit set by the MAXOPENTCBS parameter. At any one time, the pool can consist of some TCBs that are allocated to tasks, and others that are free. For example, if the MAXOPENTCBs is set to 10, at a particular time the pool could consist of 5 TCBs, not all of which are allocated to running tasks. Also the 5 TCBs could be made up of a mixture of L8 and L9 TCBs. Dispatcher attaches a new TCB when it can't find a free TCB that is suitable.

Let us assume a task requires an L8 mode TCB, either because it is an OPENAPI CICSKEY application, or because it is invoking an OPENAPI task related user exit, which happens for example when an application issues an EXEC SQL request. The process of allocating an L8 mode TCB is summarized in the following steps:

  1. If the transaction already has an L8 mode TCB allocated, it is used.
  2. If there is a free L8 mode TCB for the correct subspace, it is allocated and used.
  3. If the number of open TCBs is below the MAXOPENTCBS limit, a new L8 mode TCB is created, and associated with the task's subspace.
  4. If the number of open TCBs is at the MAXOPENTCBS limit, but there is a free L8 mode TCB with the wrong subspace, dispatcher destroys it and creates a new one for the required subspace. This technique avoids suspending the task until the number of TCBs is below the pool limit, and is called stealing. This action is recorded in the CICS dispatcher TCB mode statistics under the count of "TCB steals".
  5. If the number of open TCBs is at the MAXOPENTCBS limit, but there is a free L9 mode TCB, dispatcher destroys it and creates a an L8 TCB for the required subspace. This technique avoids suspending the task until the number of TCBs is below the pool limit, and is called stealing. This action is recorded in the CICS dispatcher TCB mode statistics under the count of "TCB steals".
  6. If the number of open TCBs is at the MAXOPENTCBS limit and there is no free open TCB to steal, the task is suspended (with an OPENPOOL wait) until one becomes free, or the MAXOPENTCBS limit is increased.

The various events that can occur during the TCB allocation process are recorded in the dispatcher TCB pool statistics, and these are reported by either the DFHSTUP or DFH0STAT statistics programs. See the Dispatcher Domain statistics.

Setting MAXOPENTCBS

The value chosen for MAXOPENTCBS in CICS TS Version 3 Release 1 needs to take account of the increased use of L8 TCBs in this release, and the new L9 mode TCBs. Prior to CICS TS Version 3 Release 1 , the pool consisted only of L8 mode TCBs, which were used exclusively by OPENAPI task related user exits, in affect the CICS-DB2 Attachment facility. Hence the value for MAXOPENTCBs could be based on the requirements of your DB2 workload, and if transaction isolation was being used, requirements to avoid stealing of TCBs between subspaces.

In CICS TS Version 3 Release 1, the setting of MAXOPENTCBs has to take into account the additional use of L8 TCBs by OPENAPI application programs running in CICS key, and by applications using Web Services or XML for which CICS will use L8 TCBs. When applications use the CICS document API with a document template which resides on an HFS file, or when CICS Web support provides static responses with a URIMAP definition using a document template or file stored on HFS, this again causes CICS to use an L8 TCB for that task. Finally, OPENAPI application programs running in user key, use L9 TCBs which reside in the same pool.

  1. If you are not using Transaction isolation, a good starting point for MAXOPENTCBS is the value specfied for TCBLIMIT in the DB2CONN definition. This represents the number of L8 TCBs you require to run your DB2 workload.
  2. If you are using Transaction isolation, for your DB2 workload, a good starting point for MAXOPENTCBS is the value of max tasks (MXT) in the SIT. This will minimize the possibility of TCB stealing due to a TCB being allocated to the wrong subspace. See How dispatcher selects an L8 or L9 mode TCB. This statement does assume that the value of max tasks has been appropriately tuned. Remember, too high a value for max tasks will undoubtedly cause short on storage problems for the CICS region. Likewise, too high a value of MAXOPENTCBS will eventually cause storage problems outside of the CICS DSAs, as MVS TCBs still consume a storage below the 16MB line.
  3. Add a value to cater for the peak number of tasks using Web Services, XML, or document templates residing on HFS.
  4. Add a value to cater for the peak number of tasks running as OPENAPI applications (non-DB2).

The value for MAXOPENTCBS can be set as a parameter in the system initialization table (SIT) or as a SIT override. It can be inquired upon and changed dynamically using the INQUIRE and SET DISPATCHER commands.

[[ Contents Previous Page | Next Page Index ]]