Previous topic |
Next topic |
Contents |
Contact z/OS |
Library |
PDF
Telling the system about the execution environment z/OS MVS Programming: Authorized Assembler Services Reference ALE-DYN SA23-1372-00 |
|||||||||||||
To generate code that is correct for the environment in which the
program runs, some macros need to know one or more of the following
characteristics about that environment:
For macros that are sensitive to their environment, use the SYSSTATE macro to define the environment. During the assembly stage, SYSSTATE sets one or more global symbols. Later, in your source code, the macro checks the global symbols and generates the correct code, which might mean avoiding using a z/Architecture® instruction or an access register. Table 1 lists MVS™ macros and identifies macros that need to know the environmental characteristics. IBM® recommends you issue the
SYSSTATE macro before you issue other macros. Once a program has issued
SYSSTATE, there is no need to reissue it, unless the program switches
from one AMODE to another or one ASC mode to another or has code paths
that are isolated according to architecture level or operating system
release. If you switch AMODE or ASC mode to a different architecture
code path, issue SYSSTATE immediately after the switch to indicate
the new state. In general, specify SYSSTATE ARCHLVL=1, and switch
to SYSSTATE ARCHLVL=2 before issuing macros in sections of code that
run in z/Architecture mode. If you do not
issue the SYSSTATE macro, the system assumes the macro is issued:
The following table describes the relevant characteristics, the parameter on SYSSTATE, and the global symbol the macro checks.
You can issue the SYSSTATE macro with the TEST parameter in your own user-written macro to allow your macros to generate code appropriate for their execution environment. Callable services do not check the global symbols described in this topic. To determine whether a callable service is sensitive to the AMODE, ASC mode, or the Architecture level, see the description of the individual callable service. In early releases of MVS, the SPLEVEL macro performs a function similar to SYSSTATE. The SPLEVEL macro identifies the level of the operating system, so that you can tune a macro expansion based on that level. You can use this where macro expansions change incompatibly. Because SPLEVEL applies to levels that the system no longer supports, it is not described in this topic. |
Copyright IBM Corporation 1990, 2014
|