SPLEVEL macro

Some macros are downward incompatible. The level of the macro expansion generated during assembly depends on the value of an assembler language global SET symbol.

The SPLEVEL macro allows programmers to change the value of the SET symbol. The SPLEVEL macro sets a default value of 5 for the SET symbol. Therefore, unless a program or installation specifically changes the default value, the macros generated are z/OS macro expansions.

The SPLEVEL macro sets the SET symbol value for that program's assembly only and affects only the expansions within the program being assembled. A single program can include multiple SPLEVEL macros to generate different macro expansions. The following example shows how to obtain different macro expansions within the same program by assembling both expansions and making a test at execution time to determine which expansion to execute.
*   DETERMINE WHICH SYSTEM IS EXECUTING
         TM      CVTDCB,CVTMVSE (CVTMVSE is bit 0 in the
         BO      SP2            CVTDCB field.)
*   INVOKE THE MVS/370 VERSION OF THE WTOR MACRO
         SPLEVEL SET=1
         WTOR    .....
         B       CONTINUE
SP2      EQU     *
*   INVOKE THE VERSION OF THE WTOR MACRO
         SPLEVEL SET=2
         WTOR    ......
CONTINUE EQU     *

z/OS MVS Programming: Assembler Services Guide and z/OS MVS Programming: Assembler Services Reference IAR-XCT describe the SPLEVEL macro.

Certain macros produce a “map” of control blocks or parameter lists. These mapping macros do not support the SPLEVEL macro. Mapping macros for different levels of MVS™ systems are available only in the macro libraries for each system. When programs use mapping macros, a different version of the program may be needed for each system.