Resuming or purging a suspended SRB (RESUME macro)

The RESUME macro enables a program to resume execution of a previously suspended SRB or to purge the SRB. Do not attempt to purge or resume a suspended SRB until after the suspend exit receives control.

To resume or purge an SRB, code the SPTOKEN parameter on the RESUME macro. SPTOKEN defines the address of an 8-byte location that contains the suspend token that identifies the SRB. This must be the same suspend token the system provided when the SUSPEND macro was issued to suspend the SRB.

To resume a suspended SRB, in addition to coding SPTOKEN you can code PURGE=NO or omit the PURGE parameter. To communicate with the resumed SRB routine, code the RSCODE parameter. RSCODE defines a fullword (the resume code) where you can place a value that the system will return to the resumed SRB routine. If you omit RSCODE, the system returns a resume code of zero to the resumed SRB routine.

To purge a suspended SRB, in addition to coding SPTOKEN, you must code PURGE=YES. A purged SRB never regains control.