HLASM Language Reference
HLASM Language Reference HLASM Language Reference
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
- Page 286 and 287: &SYSCLOCK System Variable Symbol &S
- Page 288 and 289: &SYSECT System Variable Symbol depe
- Page 290 and 291: &SYSIN_MEMBER System Variable Symbo
- Page 292 and 293: &SYSJOB System Variable Symbol &SYS
- Page 294 and 295: &SYSLIN_DSN System Variable Symbol
- Page 296 and 297: &SYSLIST System Variable Symbol The
- Page 298 and 299: &SYSLOC System Variable Symbol To
- Page 300 and 301: &SYSM_SEV System Variable Symbol &S
- Page 302 and 303: &SYSNDX System Variable Symbol The
- Page 304 and 305: &SYSOPT_DBCS System Variable Symbol
- Page 306 and 307: &SYSPARM System Variable Symbol Not
- Page 308 and 309: &SYSPRINT_MEMBER System Variable Sy
- Page 310 and 311: &SYSPUNCH_MEMBER System Variable Sy
- Page 312 and 313: &SYSSTEP System Variable Symbol Not
- Page 314 and 315: &SYSTERM_DSN System Variable Symbol
- Page 316 and 317: &SYSTIME System Variable Symbol Not
- Page 318 and 319: Macro Instruction Format sequence_s
- Page 320 and 321: Macro Instruction Format Operand En
- Page 322 and 323: Macro Instruction Format When you n
- Page 324 and 325: Sublists in Operands the order in w
- Page 326 and 327: Sublists in Operands &SYSLIST( n,m)
- Page 328 and 329: Values in Operands Notes: 1. Spaces
- Page 330 and 331: Values in Operands Parentheses In m
- Page 332 and 333: Inner and Outer Macro Instructions
- Page 334 and 335: Levels of Macro Call Nesting When t
- Page 338 and 339: How to Write Conditional Assembly I
- Page 340 and 341: SET Symbols SET Symbol Specificatio
- Page 342 and 343: SET Symbols Figure 86 (Page 3 of 3)
- Page 344 and 345: Data Attributes this example indica
- Page 346 and 347: Data Attributes variable_symbol is
- Page 348 and 349: Data Attributes The value of an att
- Page 350 and 351: Data Attributes The following attri
- Page 352 and 353: Data Attributes Assembler gives a t
- Page 354 and 355: Data Attributes The scale attribute
- Page 356 and 357: Data Attributes Number Attribute (N
- Page 358 and 359: Data Attributes The operation code
- Page 360 and 361: Lookahead MACRO &NAME MOVE &TO,&FRO
- Page 362 and 363: Open Code Sequence Symbols The cond
- Page 364 and 365: GBLA, GBLB, and GBLC Instructions G
- Page 366 and 367: LCLA, LCLB, and LCLC Instructions s
- Page 368 and 369: SETA Instruction expression is an a
- Page 370 and 371: SETA Instruction | The logical-exp
- Page 372 and 373: SETA Instruction | Figure 99 (Page
- Page 374 and 375: SETA Instruction | The result of C2
- Page 376 and 377: SETA Instruction NOT Format: Logica
- Page 378 and 379: SETA Instruction | X2A Name Operati
- Page 380 and 381: SETA Instruction In evaluating the
- Page 382 and 383: SETB Instruction Any expression tha
- Page 384 and 385: SETB Instruction ┌─────
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