Description

Note: To resume an RB, use the variation of the RESUME macro described under RESUME — Resume execution of a suspended RB.

To resume or purge a suspended supervisor request block (SRB), use this variation of the RESUME macro. Optionally, the RESUME macro enables the caller to provide a fullword of data (the resume code) to the suspended SRB routine.

Environment

Requirements for the calling program are:

Environmental factor Requirement
Minimum authorization: Supervisor state or PSW key 0 - 7
Dispatchable unit mode: SRB or task
Cross memory mode: Any
AMODE: 31-bit
ASC mode: Primary or access register (AR)
Interrupt status: Can be enabled or disabled for interrupts
Locks: Can hold no locks or can hold the local lock, the CML lock, the CMS lock, or the CPU lock
Control parameters: Must be in the caller's primary address space or addressable through the caller's dispatchable unit access list (DU-AL)

Programming requirements

Programming requirements for the calling program are:
  • Before issuing the RESUME macro, ensure that the global symbol &SYSASCE is correctly set to indicate the ASC mode of your program. To test or set this global symbol, use the SYSSTATE macro.
  • Programs in AR ASC mode must ensure that parameter addresses are ALET-qualified.

Restrictions

None.

Input register information

Before issuing the RESUME macro, the caller does not have to place any information into any register unless using it in register notation for a particular parameter, or using it as a base register.

Output register information

After the caller issues the macro, the macro might use some registers as work registers or might change the contents of some registers. When the macro returns control to the caller, the contents of these registers are not the same as they were before the macro was issued. Therefore, if the caller depends on these registers containing the same value before and after issuing the macro, the caller must save these registers before issuing the macro and restore them after the system returns control.

When control returns to the caller, the general purpose registers contain:
Register
Contents
0-1
Used as work registers by the macro
2-13
Unchanged
14
Used as a work register by the macro
15
Return code
When control returns to the caller, the access registers contain:
Register
Contents
0-1
Used as work registers by the macro
2-13
Unchanged
14-15
Used as work registers by the macro

Syntax

The standard form of the RESUME macro is written as follows:

Syntax Description
   
   name name: Symbol. Begin name in column 1.
   
One or more blanks must precede RESUME.
   
RESUME  
   
One or more blanks must follow RESUME.
   
SPTOKEN=sptoken addr sptoken addr: RX-type address.
   
,PURGE=NO Default: PURGE=NO.
,PURGE=YES  
   
   ,RSCODE=rscode addr rscode addr: RX-type address.
   
   ,RELATED=value value: Any valid macro parameter specification.
   

Parameters

The parameters are explained as follows:

SPTOKEN=sptoken addr
Specifies the address of an 8-byte location that contains the system-provided suspend token. The suspend token identifies the SRB that is to be resumed or purged.
,PURGE=NO
,PURGE=YES
Indicates whether the system is to resume (PURGE=NO) or purge (PURGE=YES) the SRB. The default is PURGE=NO. A purged SRB never regains control and cannot be resumed. Do not use RSCODE with PURGE=YES.
,RSCODE=rscode addr
Specifies the address of a fullword where you can place a value that the system will return to the resumed SRB routine. Code RSCODE only if you also code PURGE=NO or take the default. If you omit RSCODE, the system returns a resume code of zero to the resumed SRB routine.
,RELATED=value
Provides information used to self-document macros by “relating” functions or services to corresponding functions or services. The format and content of the information provided is at the discretion of the user and may be any valid coding values.

ABEND codes

17

See z/OS MVS System Codes for an explanation and programmer responses for this code.

Return codes

When the RESUME macro returns control to your program, GPR 15 contains a hexadecimal return code.

Table 1. Return Codes for the RESUME Macro for SRBs
Return Code Meaning and Action
00 Meaning: The system has scheduled the suspended SRB to be resumed.

Action: None.

04 Meaning: The address space in which the suspended SRB would have executed has been scheduled for termination. The system will purge the suspended SRB.

Action: None required. However, you might take some action based upon your application.

08 Meaning: The suspend token (SPTOKEN) does not identify a currently suspended SRB routine. The SRB may have already been resumed or purged.

Action: None required. However, you might take some action based upon your application.

24 Meaning: System error. An error occurred while trying to resume the suspended SRB. The SRB cannot be resumed.

Action: Retry the request.

Example

Resume the execution of a suspended SRB.
⋮
          RESUME   SPTOKEN=TOKEN,PURGE=NO,RSCODE=RCODE
⋮
          DS    F
RCODE     DC    X'99999999'
TOKEN     DS    CL8
⋮