Transferring control for SRB processing (TCTL macro)

The TCTL (transfer control) macro allows an SRB routine to exit from its processing and to pass control to a task with minimal system overhead. When an SRB specifies RESUME RETURN=N, control transfers to the resumed TCB. Control then passes to the top RB on the TCB/RB chain, but only if the system determines that the RB is dispatchable.

Some other considerations for using the TCTL macro are:
  • The TCTL macro can be used only by SRB programs, but they may be in any key. If a non-SRB routine issues either the TCTL macro or a RESUME RETURN=N, the routine will abnormally terminate with a X'070' system completion code.
  • The TCTL macro causes cleanup of the SRB.
  • The TCTL macro requires inclusion of the CVT mapping macro.

The TCTL macro requires that the SRB requesting the TCTL must not hold any locks and must be in primary ASC mode, where the home and primary address space is the same.