Open TCBs and external resource managers

In the CICS open transaction environment (OTE), when application programs, task-related user exits (TRUEs), global user exit programs, and user-replaceable modules are defined to CICS as threadsafe, they can run concurrently on open TCBs in the OTE.

Quasirent TRUEs are invoked on QR TCB and create their own subtask TCBs. Typically, the subtask TCB is posted to access the external resource manager, while the CICS® task running on the QR TCB in the TRUE is put into a CICS dispatcher wait until the subtask completes its work. The CICS dispatcher wait allows the CICS dispatcher to dispatch another CICS task on the QR TCB in the meantime. The reason for this architecture is that external resource managers cannot be invoked directly by a caller on the QR TCB, because any operating system wait issued by the external resource manager would halt the QR TCB, and the whole of CICS.

An open API TRUE is invoked on an L8 mode TCB, which is dedicated for use by the calling CICS task, and is separate from the CICS QR TCB. Therefore, a TRUE can invoke its external resource manager on the allocated L8 TCB and avoid the need to manage its own set of subtask TCBs. An operating system wait issued by an external resource manager halts the L8 TCB, but CICS continues processing on the QR TCB, and on other open TCBs.

An open API TRUE, although freed from the constraints imposed by the QR TCB, and from having to create subtask TCBs, nevertheless does have obligations both to the CICS system as a whole and to future users of the L8 TCB it is using. An L8 TCB is dedicated for use by the CICS task to which it is allocated, but when the CICS task has completed, the L8 TCB is returned to the dispatcher-managed pool of L8 mode TCBs, provided it is still in a clean state. An unclean TCB in this context means that the task using the L8 mode TCB suffered an unhandled abend in an open API TRUE, and not that the TRUE has broken the threadsafe restrictions, which CICS would not detect. The L8 TCB is not dedicated for use by a particular open API TRUE, but is used by all open API TRUEs and OPENAPI programs invoked by the CICS task to which the L8 mode TCB is allocated. Also, if an application program invoking an open API TRUE is coded to threadsafe standards, and defined to CICS as threadsafe, it continues to run on the L8 mode TCB on return from the TRUE. When considering whether to use CICS OTE support rather than manage your own subtask TCBs, consider the restrictions listed in Threadsafe restrictions. You can then decide whether to work within these restrictions or to use your own subtask TCB, which is dedicated for your own TRUE's use.

Start of changeWhen a TRUE is enabled REQUIRED and OPENAPI, it is treated the same as if it were enabled THREADSAFE and OPENAPI. For consistency, an INQUIRE EXITPROGRAM for either combination will always return THREADSAFE, OPENAPI. For a task-related user exit enabled REQUIRED and CICSAPI, INQUIRE EXITPROGRAM will return REQUIRED, CICSAPI.End of change



externalmanagers.html | Timestamp icon Last updated: Thursday, 27 June 2019