The MODESET macro is used to change system status by altering the PSW key and/or PSW problem state indicator. The MODESET macro has two forms: the form that generates inline code and the form that generates an SVC.
The requirements for the caller are:
Environmental factor | Requirement |
---|---|
Minimum authorization: |
|
Dispatchable unit mode: | Task |
Cross memory mode: | Any PASN, any HASN, any SASN |
AMODE: | 24- or 31- or 64-bit |
ASC mode: | Primary or secondary |
Interrupt status: | Enabled or disabled for I/O and external interrupts |
Locks: | The caller may hold locks, but is not required to hold any. |
Control parameters: | None. |
The caller must include the IKJTCB and IHARB mapping macros. If EXTKEY= TCB, RBT1, or RBT234 is specified, the home address space must be the currently addressable address space.
None.
If any of the following parameters are specified: EXTKEY=TCB, EXTKEY=RBT1, or EXTKEY=RBT234, before issuing the MODESET macro, the caller must load the address of the active TCB into a register and establish addressability to that TCB. If none of the above is specified, the caller does not have to place any information into any register before issuing the MODESET macro unless using it in register notation for a particular parameter, or using it as a base register.
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.
None.
The standard form of the MODESET macro that generates inline code is written as follows:
Syntax | Description |
---|---|
name | name: Symbol. Begin name in column 1. |
␢ | One or more blanks must precede MODESET. |
MODESET | |
␢ | One or more blanks must follow MODESET. |
EXTKEY=key | key: One of the following:
|
KEYADDR=new key addr | |
KEYREG=new key reg | |
new key addr: RX-type address or register (2). | |
new key reg: Register 1-15 without parentheses; may be symbolic. | |
,SAVEKEY=old key addr | old key addr: RX-type address or register (2). |
Note:
|
|
,WORKREG=work reg | work reg: Decimal digits 0-15 without parentheses. |
Note:
|
|
,RELATED=value | value: Any valid macro keyword specification. |
The parameters are explained as follows:
The MODESET macro might abnormally terminate with abend code X'0C2'. See z/OS MVS System Codes for an explanation and programmer response.
None.
MODESET EXTKEY=TCB,SAVEKEY=KEYSAVE,WORKREG=1
MODESET KEYREG=REG3,SAVEKEY=KEY,WORKREG=4
The requirements for the caller are:
Environmental factor | Requirement |
---|---|
Minimum authorization: | One of the following:
|
Dispatchable unit mode: | Task |
Cross memory mode: | PASN=HASN=SASN |
AMODE: | 24- or 31-bit |
ASC mode: | Primary |
Interrupt status: | Enabled or disabled for I/O and external interrupts |
Locks: | No locks held |
Control Parameters: | Must be in primary address space |
None.
None.
Before issuing the MODESET 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.
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.
None.
The standard form of the MODESET macro that generates an SVC is written as follows:
Syntax | Description |
---|---|
name | name: Symbol. Begin name in column 1. |
␢ | One or more blanks must precede MODESET. |
MODESET | |
␢ | One or more blanks must follow MODESET. |
KEY=ZERO | Note: KEY is required if MODE is not specified.
|
KEY=NZERO | |
,MODE=PROB | Note: MODE is required if KEY is not specified.
|
,MODE=SUP | |
,RELATED=value | value: Any valid macro keyword specification. |
The parameters are explained as follows:
The MODESET macro might abnormally terminate with abend code X'16B'. See z/OS MVS System Codes for an explanation and programmer response.
When the MODESET macro returns control to your program, GPR 15 contains a hexadecimal return code and GPR 0 contains a hexadecimal reason code.
Return Code | Reason Code | Meaning and Action |
---|---|---|
00 | 00 | Meaning: The operation was successful. Action: None. |
MODESET KEY=ZERO,MODE=SUP