A program need use SYSSTATE TEST only when it wants to query the value of one of the variables. When setting variables (i.e., not SYSSTATE TEST), you can specify one or more of the parameters available. The variables associated with not-specified variables remain unchanged.
The requirements for the caller are:
Environmental factor | Requirement |
---|---|
Minimum authorization: | Problem state, and any PSW key. |
Dispatchable unit mode: | Task or SRB |
Cross memory mode: | Any PASN, any HASN, any SASN |
AMODE: | 24- or 31- or 64-bit |
ASC mode: | Primary or AR |
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. |
None.
None.
Before issuing the SYSSTATE 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.
None.
The SYSSTATE macro is written as follows:
Syntax | Description |
---|---|
name | name: Symbol. Begin name in column 1. |
␣ | One or more blanks must precede SYSSTATE. |
SYSSTATE | |
␣ | One or more blanks must follow SYSSTATE. |
TEST | |
ASCENV=P | Default: ASCENV=P |
ASCENV=AR | |
AMODE64=NO | Default: AMODE64=NO |
AMODE64=YES | |
ARCHLVL=0 | Default: ARCHLVL=0 |
ARCHLVL=1 | |
ARCHLVL=2 | |
ARCHLVL=3 | |
ARCHLVL=OSREL | |
OSREL=osrel | |
PUSH | |
POP | |
The parameters are explained as follows:
You can also specify OSREL=SYSSTATE, which indicates that the OSREL is to match the release of z/OS that provided the SYSSTATE macro with which you are assembling.
None.
None.
SAC 512
SYSSTATE ASCENV=AR
L 15,X'10' Get CVT address
TM CVTOSLV3-CVT(15),CVTZOS_V1R6
JZ NOT_V1R6
SYSSTATE PUSH save SYSSTATE values
SYSSTATE OSREL=ZOSV1R6
LXRES ELXLIST=...
SYSSTATE POP restore SYSSTATE values
NOT_V1R6 DS 0H
SAC 512
SYSSTATE PUSH
SYSSTATE ASCENV=AR
* code running in AR-mode
SYSSTATE POP
MACRO
TESTMAC
GBLC &SYSOSREL
GBLC &SYSOSREL_ZOSV1R6
SYSSTATE TEST
AIF (&SYSOSREL GE &SYSOSREL_ZOSV1R6).GENV1R6
* produce code suitable for prior to z/OS v1 R6
AGO .MACEND
.GENV1R6 ANOP
* produce code suitable for z/OS v1 R6 or later
.MACEND ANOP
MEND