Environmental considerations

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 of that environment:

In addition some macros generate more efficient code when the execution environment is newer. For macros that are sensitive to their environment, use the SYSSTATE macro to define the environment. During the assembly stage, SYSSTATE sets 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. For more information about SYSSTATE, refer to z/OS MVS Programming: Assembler Services Reference IAR-XCT.

IBM recommends that 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:

All VSAM macros can be issued in 24-bit or 31-bit mode. The non-VSAM macro descriptions state whether it can be issued in 31-bit mode and which fields may reside above the 16 MB line. For information about which macros can be issued in 31-bit mode, refer to Macros available by access method.

For those macros that may be issued in 31-bit addressing mode, the macro description may state that when it is issued in 31-bit addressing mode, it expects all addresses to be valid 31-bit addresses. A valid, or clean, 31-bit address is a 4-byte address in which, when referring to location below the 16 MB line, the high order byte is zero, or, when referring to locations above the 16 MB line, the high order bit is zero. For more information, refer to Data above the 16MB line.