Subtask control

Subtask control is the interface between a CICS® task and a subtask. It avoids suspending CICS execution, and improves the response time.

This function is invoked by the DFHSK macro with the following calls:
  • CTYPE=PERFORM activates an exit routine under a new TCB.
  • CTYPE=WAIT waits for subtask to complete.
  • CTYPE=RETURN returns control to the main CICS TCB.

Design overview

Some synchronous operating system requests issued by CICS modules could cause CICS to be suspended until the requests had completed. To avoid the resulting response-time degradation, certain requests are processed by the general-purpose subtask control program, DFHSKP. A CICS module calls DFHSKP to execute a routine within the module under a subtask of the operating system.

DFHSKP does the following:
  • Schedules a subtask to execute a routine (called an SK exit routine)
  • Allows an SK exit routine to wait on an event control block (ECB) of the operating system
  • Manages subtask creation, execution, and termination
  • Handles program checks or abends within the SK exit routine.

Control blocks

This function has the following control blocks:
  • SK static storage contains pointers to free work queue elements (WQEs) and to work queue elements.
  • SKRQLIST is the parameter area passed to DFHSKP on a request. It contains the address of the code to be executed, and the address of the ECB.
  • DFHSKWPS is the WKE structure containing the address of the next WQE in the chain, the contents of the parameter field from CTYPE=PERFORM, the save area for registers, and the work-complete ECB.
  • DFHSKAPS is the subtask control area. Each instance of this control block describes the state of one subtask and contains the address of automatic storage to be used by DFHSKE, pointers to the WQE used by the subtask, the current WQE being processed, and the ECB for work and completion.

Modules

Module Function
DFHSKC The subtask control program is run by DFHSKM to start a subtask of the operating system.
DFHSKE The general-purpose multitask program is run as a subtask of the operating system.
DFHSKM The subtask manager program causes the routine to run under a subtask.

Exits

No global user exit points are provided for this function.

Trace

The following point ID is provided for this function:
  • AP 00DE, for which the trace level is AP 1.

External interfaces

The following external calls are made by DFHSKC:
  • MVS ATTACH to attach a new TCB.
  • MVS DETACH to detach a TCB.
  • MVS POST to post a CICS TCB.
The following external calls are made by DFHSKE:
  • MVS ESTAE to establish an error exit.
  • MVS WAIT to synchronize with the TCB.
  • MVS SETRP to retry after a failure.

Module reference