The value contained in an outer macro instruction operand can be passed through one or more levels of nesting (see Figure 35). However, the value specified (see 1 in Figure 35) in the inner macro instruction operand must be identical to the corresponding symbolic parameter (see 2 in Figure 35) declared in the prototype of the containing macro definition.
Thus, a sublist can be passed (see 3 in Figure 35) and referred to (see 4 in Figure 35) as a sublist in the macro definition called by the inner macro call. Also, any symbol (see 5 in Figure 35) that is passed carries its attribute values through the nesting levels.
If inner macro calls at each level are specified with symbolic parameters as operand values, values can be passed from open code through several levels of macro nesting.
COMPAT(SYSLIST) Assembler Option: If the COMPAT(SYSLIST) assembler option is specified, and a symbolic parameter is only a part of the value specified in an inner macro instruction operand, only the character string value given to the parameter by an outer call is passed through the nesting level. Inner sublist entries are, therefore, not available for reference in the inner macro.
2 MACRO *----*----* OUTER &P1,&P2,&P3 . . . INNER &P1,&P2,&P3 . *----*----* . 1 . MEND MACRO INNER &Q,&R,&S . . * L 3,&Q(1) | A 3,&Q(2) * 4 ST 3,&Q(3) | . * . MVC &R,&S . . MEND ---------------------------------------------------------------- START 0 . 5 . *--*--* OUTER (AREA,F200,SUM),TO,FROM1 . *------*------* . 3 . + L 3,AREA + A 2,F200 + ST 3,SUM . . + MVC TO,FROM . . END
INNER (AREA,F200,SUM),TO,FROM
[ Top of Page | Previous Page | Next Page | Contents | Index ]