System variable symbols in nested macros
The
fixed
global-scope system variable symbols (see System variable symbols) are not affected by the nesting of macros.
The variable global-scope system variable symbols have values which might change
during the expansion of a macro definition. The following system
variable is influenced by nested macros:
- &SYSM_SEV
- Provides the highest MNOTE severity code from the nested macro most recently called.
The following system variable symbols
can be affected by the position of a macro instruction in
code or the operand value specified in the macro instruction:
- &SYSCLOCK
- The assembler assigns &SYSCLOCK the constant string value representing the TOD clock value at the time at which a macro call is made. The time portion of this value is precise to the microsecond. For any inner macro call, the value assigned to &SYSCLOCK differs from that of its parent.
- &SYSECT
- The assembler gives &SYSECT the character string value of the name of
the control section in use at the point at which a macro call is made.
For a macro definition called by an inner macro call, the assembler
assigns to &SYSECT the name of the control section in effect in the
macro definition that contains the inner macro call, at the time the
inner macro is called.
If no control section is generated within a macro definition, the value assigned to &SYSECT does not change. It is the same for the next level of macro definition called by an inner macro instruction.
- &SYSLIB_DSN, &SYSLIB_MEMBER, &SYSLIB_VOLUME
- The assembler assigns the character string value of the &SYSLIB system variable symbols at the point at which a macro is called. For an inner macro call whose definition is from a library member, these values might differ, if this is the first time this macro is invoked.
- &SYSLIST
- If &SYSLIST is specified in a macro definition called by an inner macro instruction, &SYSLIST refers to the positional operands of the inner macro instruction.
- &SYSLOC
- The assembler gives &SYSLOC the character string value of the name of the location counter in use at the point at which a macro is called. For a macro definition called by an inner macro call, the assembler assigns to &SYSLOC the name of the location counter in effect in the macro definition that contains the inner macro call. If no LOCTR or control section is generated within a macro definition, the value assigned to &SYSLOC does not change. It is the same for the next level of macro definition called by an inner macro instruction.
- &SYSNDX
- The assembler increments &SYSNDX by one each time it encounters a macro call. It retains the incremented value throughout the expansion of the macro definition called, that is, within the local scope of the nesting level.
- &SYSNEST
- The assembler increments &SYSNEST by one each time it encounters a nested macro instruction. It retains the incremented value within the local scope of the macro definition called by the inner macro instruction. Subsequent nested macro instructions cause &SYSNEST to be incremented by 1. When the assembler exits from a nested macro it decreases the value in &SYSNEST by 1.
- &SYSSEQF
- The assembler assigns &SYSSEQF the character string value of the identification-field of the outer-most macro instruction statement. The value of &SYSSEQF remains constant throughout the expansion of the called macro definition and all macro definitions called from within the outer macro.
- &SYSSTYP
- The assembler gives &SYSSTYP the character string value of the type
of the control section in use at the point at which a macro is called.
For a macro definition called by an inner macro call, the assembler
assigns to &SYSSTYP the type of the control section in effect in the
macro definition that contains the inner macro call, at the time the
inner macro is called.
If no control section is generated within a macro definition, the value assigned to &SYSSTYP does not change. It is the same for the next level of macro definition called by an inner macro instruction.