IWMRESET — Change a job

The IWMRESET macro allows the caller to perform the same functions as the RESET system command. The caller can:
  • Change the service class of work currently in execution, with the SRVCLASS keyword. Resetting to a new service class also resumes quiesced work.
  • Quiesce work currently in execution, with the QUIESCE keyword.
  • Reclassify work currently in execution according to the service policy in effect, with the RESUME keyword. The RESUME keyword also resumes quiesced work.

The system does not allow every address space to be reset. The IWMRESET service has the same restrictions as the RESET system command. Refer to z/OS® MVS System Commands for more information.

Environment

The requirements for the caller are:

Minimum authorization: Supervisor state or program key mask (PKM) allowing keys 0-7.
Dispatchable unit mode: Task
Cross memory mode: PASN=HASN=SASN
AMODE: 31-bit
ASC mode: Primary
Interrupt status: Enabled for I/O and external interrupts
Locks: No locks may be held.
Control parameters: Control parameters must be in the primary address space.

Programming requirements

  1. The macro CVT must be included to use this macro.
  2. The macro IWMYCON must be included to use this macro.
  3. The macro IWMPB must be in the library concatenation, since it is included by IWMYCON.
  4. Note that the high-order halfword of register 0, and the reason code variable when specified, may be non-zero and represents diagnostic data which is NOT part of the external interface. The high-order halfword should thus be excluded from comparison with the reason code values described above. The constant, IWMRSNCODE_MASK_CONST defined in IWMYCON, may be used for this purpose.

Restrictions

The caller cannot have an EUT FRR established.

Input register information

Before issuing the IWMRESET 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

When control returns to the caller, the GPRs contain:
Register
Contents
0
Reason code if GR15 return code is non-zero
1
Used as work registers by the system
2-13
Unchanged
14
Used as work registers by the system
15
Return code
When control returns to the caller, the ARs contain:
Register
Contents
0-1
Used as work registers by the system
2-13
Unchanged
14-15
Used as work registers by the system

Some callers depend on register contents remaining the same before and after issuing a service. If the system changes the contents of registers on which the caller depends, the caller must save them before issuing the service, and restore them after the system returns control.

Performance implications

None.

Syntax

The syntax of the IWMRESET macro is as follows:

Read syntax diagramSkip visual syntax diagramnameIWMRESETJOBNAME= jobname.,ASID= asid,FUNCTION=RESET,SRVCLASS= srvclass,FUNCTION=QUIESCE,FUNCTION=RESUME,USERID= userid,PRODUCT= product,RETCODE= retcode,RSNCODE= rsncode,PLISTVER=IMPLIED_VERSION,PLISTVER=MAX,PLISTVER=0,MF=S,MF=(L, list addr,0D, attr),MF=(E, list addr,COMPLETE,NOCHECK),MF=(M, list addr,COMPLETE,NOCHECK)

Parameters

The parameters are explained as follows:
name
An optional symbol, starting in column 1, that is the name on the IWMRESET macro invocation. The name must conform to the rules for an ordinary assembler language symbol.
ASID=asid
A parameter which contains the address space identifier (ASID) of the job you want to change.

To code: Specify the RS-type address, or address in register (2)-(12), of a halfword field.

,FUNCTION=RESET
,FUNCTION=QUIESCE
,FUNCTION=RESUME
An optional parameter, which indicates the function to perform against the job. The default is FUNCTION=RESET.
,FUNCTION=RESET
Requests that the job's service class or performance group be changed.
,FUNCTION=QUIESCE
Requests that the job be quiesced. If the job is non-swappable, it is given the lowest possible performance characteristics.
,FUNCTION=RESUME
Requests that the job be reclassified according to the service policy in effect. This undoes a prior request to reset the job to a particular service class, or to quiesce the job.
JOBNAME=jobname
A required input parameter which contains the jobname of the job you want to change. If there is more than one executing job with this jobname, you must specify the ASID parameter to identify the specific job.

To code: Specify the RS-type address, or address in register (2)-(12), of an 8-character field.

,MF=S
,MF=(L,list addr)
,MF=(L,list addr,attr)
,MF=(L,list addr,0D)
,MF=(E,list addr)
,MF=(E,list addr,COMPLETE)
,MF=(E,list addr,NOCHECK)
,MF=(M,list addr)
,MF=(M,list addr,COMPLETE)
,MF=(M,list addr,NOCHECK)
An optional input parameter that specifies the macro form.

Use MF=S to specify the standard form of the macro, which builds an inline parameter list and generates the macro invocation to transfer control to the service. MF=S is the default.

Use MF=L to specify the list form of the macro. Use the list form together with the execute form of the macro for applications that require reentrant code. The list form defines an area of storage that the execute form uses to store the parameters. Only the PLISTVER parameter may be coded with the list form of the macro.

Use MF=E to specify the execute form of the macro. Use the execute form together with the list form of the macro for applications that require reentrant code. The execute form of the macro stores the parameters into the storage area defined by the list form, and generates the macro invocation to transfer control to the service.

Use MF=M together with the list and execute forms of the macro for service routines that need to provide different options according to user-provided input. Use the list form to define a storage area; use the modify form to set the appropriate options; then use the execute form to call the service.

IBM® recommends that you use the modify and execute forms of IWMRESET in the following order:
  • Use IWMRESET ...MF=(M,list-addr,COMPLETE) specifying appropriate parameters, including all required ones.
  • Use IWMRESET ...MF=(M,list-addr,NOCHECK), specifying the parameters that you want to change.
  • Use IWMRESET ...MF=(E,list-addr,NOCHECK), to execute the macro.
,list addr
The name of a storage area to contain the parameters. For MF=S, MF=E, and MF=M, this can be an RS-type address or an address in register (1)-(12).
,attr
An optional 1- to 60-character input string that you use to force boundary alignment of the parameter list. Use a value of 0F to force the parameter list to a word boundary, or 0D to force the parameter list to a doubleword boundary. If you do not code attr, the system provides a value of 0D.
,COMPLETE
Specifies that the system is to check for required parameters and supply defaults for omitted optional parameters.
,NOCHECK
Specifies that the system is not to check for required parameters and is not to supply defaults for omitted optional parameters.
,PLISTVER=IMPLIED_VERSION
,PLISTVER=MAX
,PLISTVER=0
An optional input parameter that specifies the version of the macro. PLISTVER determines which parameter list the system generates. PLISTVER is an optional input parameter on all forms of the macro, including the list form. When using PLISTVER, specify it on all macro forms used for a request and with the same value on all of the macro forms. The values are:
  • IMPLIED_VERSION, which is the lowest version that allows all parameters specified on the request to be processed. If you omit the PLISTVER parameter, IMPLIED_VERSION is the default.
  • MAX, if you want the parameter list to be the largest size currently possible. This size might grow from release to release and affect the amount of storage that your program needs.

    If you can tolerate the size change, IBM recommends that you always specify PLISTVER=MAX on the list form of the macro. Specifying MAX ensures that the list-form parameter list is always long enough to hold all the parameters you might specify on the execute form; in this way, MAX ensures that the parameter list does not overwrite nearby storage.

  • 0, if you use the currently available parameters.
To code: Specify one of the following:
  • IMPLIED_VERSION
  • MAX
  • A decimal value of 0
,PRODUCT=product
A required input parameter, which contains the product name that is requesting the job be changed. The product name is included in the SMF 90 subtype 30 record created by IWMRESET.

To code: Specify the RS-type address, or address in register (2)-(12), of an 8-character field.

,RETCODE=retcode
An optional output parameter into which the return code is to be copied from GPR 15.

To code: Specify the RS-type address of a fullword field, or register (2)-(12).

,RSNCODE=rsncode
An optional output parameter into which the reason code is to be copied from GPR 0.

To code: Specify the RS-type address of a fullword field, or register (2)-(12).

,SRVCLASS=srvclass

When FUNCTION=RESET is specified, a required input parameter which is the service class to be assigned to the job. Resetting to a new service class also resumes quiesced work.

When you reset a server to a new service class, the goals associated with that service class are ignored. However the resource group associated with the new service class is honored. The one exception where the goal for a server is honored is when the transactions it is serving have been assigned a discretionary goal.

To code: Specify the RS-type address of an 8-character field.

,USERID=userid
A required input parameter, which contains the ID of the user who is requesting the job be changed. The user ID is included in the SMF 90 subtype 30 record created by IWMRESET. If there is no user ID available, the caller should pass blanks.

To code: Specify the RS-type address, or address in register (2)-(12), of an 8-character field.

ABEND codes

None.

Return codes and reason codes

When the IWMRESET macro returns control to your program:
  • GPR 15 (and retcode, if you coded RETCODE) contains a return code.
  • When the value in GPR 15 is not zero, GPR 0 (and rsncode, if you coded RSNCODE) contains reason code.

The following table identifies the hexadecimal return and reason codes and the equate symbol associated with each reason code. IBM support personnel may request the entire reason code, including the xxxx value.

Table 1. Return and Reason Codes for the IWMRESET Macro
Return Code Reason Code Equate Symbol, Meaning, and Action
0 Equate Symbol: IwmRetCodeOk

Meaning: Successful completion.

Action: None required.

4 Equate Symbol: IwmRetCodeWarning

Meaning: Successful completion, unusual conditions noted.

4 xxxx0408 Equate Symbol: IwmRsnCodeWorkNotFound

Meaning: A job matching the input job name or ASID was not found.

Action: The caller should report the error appropriately.

8 Equate Symbol: IwmRetCodeInvocError

Meaning: Invalid invocation environment or parameters.

8 xxxx0801 Equate Symbol: IwmRsnCodeSRBMode

Meaning: The caller is in SRB mode.

Action: Avoid requesting this function while in SRB mode.

8 xxxx0803 Equate Symbol: IwmRsnCodeDisabled

Meaning: Caller is disabled.

Action: Avoid requesting this function while disabled.

8 xxxx0804 Equate Symbol: IwmRsnCodeLocked

Meaning: The caller is locked.

Action: Avoid requesting this function while locked.

8 xxxx080B Equate Symbol: IwmRsnCodeBadPl

Meaning: Error accessing parameter list.

Action: Check for possible storage overlay.

8 xxxx0810 Equate Symbol: IwmRsnCodeEutFrr

Meaning: The caller has EUT FRR established.

Action: Avoid requesting this function with an EUT FRR set.

8 xxxx0824 Equate Symbol: IwmRsnCodeAmode24

Meaning: The caller invoked the service but was in 24-it addressing mode.

Action: Request this function only when you are in 31-bit addressing mode.

8 xxxx0825 Equate Symbol: IwmRsnCodeAscModeNotPrimary

Meaning: The caller invoked the service but was not in primary ASC mode.

Action: Avoid requesting this function in this environment.

8 xxxx0827 Equate Symbol: IwmRsnCodeRsvdNot0

Meaning: Reserved field in parameter list was non-zero.

Action: Check for use of keywords that are not supported by the MVS™ Release on which the program is running.

8 xxxx0828 Equate Symbol: IwmRsnCodeBadVersion

Meaning: Version number in parameter list is not valid.

Action: Check for possible storage overlay of the parameter list.

8 xxxx0829 Equate Symbol: IwmRsnCodeBadOptions

Meaning: Parameter list omits required parameters.

Action: Check for possible storage overlay of the parameter list.

8 xxxx0841 Equate Symbol: IwmRsnCodeXMemMode

Meaning: The caller is in cross-memory mode.

Action: Invoke the function in non-cross memory mode.

C Equate Symbol: IwmRetCodeEnvError

Meaning: Environmental error.

C xxxx0C28 Equate Symbol: IwmRsnCodeBadServiceClass

Meaning: The input service class name is not defined in the active workload manager policy.

Action: Record or report the error if appropriate.

C xxxx0C2D Equate Symbol: IwmRsnCodeBadPerformanceGroup

Meaning: Reserved.

C xxxx0C2F Equate Symbol: IwmRsnCodeSystemSpace

Meaning: The input address space is either a system component address space or a privileged address space. It cannot be reset.

With APAR OA12625 installed, the restriction for privileged address spaces has been removed, meaning that privileged address spaces can be reset. The system component address space still cannot be reset.

Action: Record or report the error if appropriate.

C xxxx0C30 Equate Symbol: IwmRsnCodeDuplicateJobs

Meaning: There is more than one job active with the same job name.

Action: Specify the ASID parameter to identify the specific job.

C xxxx0C31 Equate Symbol: IwmRsnCodeWrongASID

Meaning: The active job in the specified address space has a different job name than the one passed by the caller.

Action: Record or report the error if appropriate.

C xxxx0C32 Equate Symbol: IwmRsnCodeNotEligibleForSrvClass

Meaning: The active job in the specified address space is not eligible for reset into the specified system service class. Only address spaces created with the ASCRE HIPRI attribute are eligible for reset into the SYSTEM service class.

Action: Record or report the error if appropriate.

10 Equate Symbol: IwmRetCodeCompError

Meaning: Component error.

Action: Contact your system programmer.

Example

To change the service class of the job executing in the ASID at location JOBASID, specify:
         IWMRESET ASID=JOBASID,SRVCLASS=SCNAME,USERID=USR,
              PRODUCT=PROD
*
* Storage areas
*
JOBASID   DS   H               Contains the address space id
*                              of the job
SCNAME    DS   CL8             Contains the service class name
*                              to assign to the job
USR       DS   CL8             Contains the id of the user who
*                              is requesting the change
PROD      DS   CL8             Contains the product name of
*                              the code invoking IWMRESET