Previous topic |
Next topic |
Contents |
Contact z/OS |
Library |
PDF
Passing values through nesting levels HLASM Language Reference SC26-4940-06 |
|
The value contained in an outer macro instruction operand can be passed through one or more levels of nesting (see Figure 1). However, the value specified (see 1 in Figure 1) in the inner macro instruction operand must be identical to the corresponding symbolic parameter (see 2 in Figure 1) declared in the prototype of the containing macro definition. Thus, a sublist can be passed (see 3 in Figure 1) and referred to (see 4 in Figure 1) as a sublist in the macro definition called by the inner macro call. Also, any symbol (see 5 in Figure 1) 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.
Figure 1. Passing values
through nesting levels
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,FROM¹ . └──────┬──────┘ . 3 . + L 3,AREA + A 2,F200 + ST 3,SUM . . + MVC TO,FROM . . END Note:
|
Copyright IBM Corporation 1990, 2014
|