Previous topic |
Next topic |
Contents |
Contact z/OS |
Library |
PDF
General rules and restrictions HLASM Language Reference SC26-4940-06 |
|
Macro instruction statements can be written inside macro definitions. Values
are substituted in the same way as they are for the model statements
of the containing macro definition. The assembler processes the called
macro definition, passing to it the operand values (after substitution)
from the inner macro instruction. In addition to the operand values
described in Values in operands, nested macro calls
can specify values that include:
Figure 1. Values
in nested macro calls
┌──────────── Parameters │ MACRO ┌────────┴────────┐ OUTERMAC &P1,&P2,&KEY1=VALUE Prototype . │ . 1 . │ LCLC &C──────────────> 2 . │ │ . │ │ &C SETC 'ABC' │ │ . │ │ . V V INNERMAC &P1,&KEY1,&C Inner macro call . └─────┬────┘ . └─────────────── Operands . MEND ───────────────────────────────────────────────────────────────────── MACRO OUT Prototype . . . 3 3 3 IN &SYSLIST(3),&SYSECT,A&SYSDNX Inner macro call . . MEND The number of nesting levels permitted depends on the complexity and size of the macros at the different levels; that is, the number of operands specified, the number of local-scope and global-scope SET symbols declared, and the number of sequence symbols used. When the assembler processes a macro exit instruction, either MEXIT or MEND, it selects the next statement to process depending on the level of nesting. If the macro exit instruction is from an inner macro, the assembler processes the next statement after the statement that called the outer macro. The next statement in open code might come from the AINSERT buffer. If the macro exit instruction is from an outer macro, the assembler processes the next statement in open code, after the statement that called the outer macro. |
Copyright IBM Corporation 1990, 2014
|