HLASM Language Reference

HLASM Language Reference HLASM Language Reference

faculty.cs.niu.edu
from faculty.cs.niu.edu More from this publisher
22.02.2015 Views

Levels of Macro Call Nesting System Variable Symbols in Nested Macros The fixed global-scope system variable symbols (see “System Variable Symbols” on page 262) are not affected by the nesting of macros. The variable global-scope system variable symbols have values which may 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 local system variable symbols are given read-only values each time a macro definition is 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 may differ, if this is the first time this macro is invoked. &SYSLIST &SYSLOC &SYSNDX 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. 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. 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. 316 HLASM V1R5 Language Reference

Levels of Macro Call Nesting &SYSNEST &SYSSEQF &SYSSTYP 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. 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. 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. Chapter 8. How to Write Macro Instructions 317

Levels of Macro Call Nesting<br />

&SYSNEST<br />

&SYSSEQF<br />

&SYSSTYP<br />

The assembler increments &SYSNEST by one each time it<br />

encounters a nested macro instruction. It retains the incremented<br />

value within the local scope of the macro definition called by the<br />

inner macro instruction. Subsequent nested macro instructions<br />

cause &SYSNEST to be incremented by 1. When the assembler<br />

exits from a nested macro it decreases the value in &SYSNEST by<br />

1.<br />

The assembler assigns &SYSSEQF the character string value of<br />

the identification-field of the outer-most macro instruction statement.<br />

The value of &SYSSEQF remains constant throughout the<br />

expansion of the called macro definition and all macro definitions<br />

called from within the outer macro.<br />

The assembler gives &SYSSTYP the character string value of the<br />

type of the control section in use at the point at which a macro is<br />

called. For a macro definition called by an inner macro call, the<br />

assembler assigns to &SYSSTYP the type of the control section in<br />

effect in the macro definition that contains the inner macro call, at<br />

the time the inner macro is called.<br />

If no control section is generated within a macro definition, the value<br />

assigned to &SYSSTYP does not change. It is the same for the<br />

next level of macro definition called by an inner macro instruction.<br />

Chapter 8. How to Write Macro Instructions 317

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!