Previous topic |
Next topic |
Contents |
Contact z/OS |
Library |
PDF
Positional operands HLASM Language Reference SC26-4940-06 |
|
You can use a positional operand to pass a value into a macro definition through the corresponding positional parameter declared for the definition. Declare a positional parameter in a macro definition when you want to change the value passed at every call to that macro definition. You can also use a positional operand to pass a value to the system variable symbol &SYSLIST. If &SYSLIST, with the applicable subscripts, is specified in a macro definition, you do not need to declare positional parameters in the prototype statement of the macro definition. You can thus use &SYSLIST to refer to any positional operand. This allows you to vary the number of operands you specify each time you call the same macro definition. The positional operands of a macro instruction must be specified in the same order as the positional parameters declared in the called macro definition. Each positional operand constitutes a character string. This character string is the value passed through a positional parameter into a macro definition. The specification for each positional parameter in the prototype
statement definition must be a valid variable symbol. Values are assigned
(see 1 ) to the positional operands by
the corresponding positional arguments see 2 below)
specified in the macro instruction that calls the macro definition.
Figure 1. Positional
operands
Source Module ┌────────────────────────────────────────────────┐ Macro │ MACRO │ Definition ├────────────────────────────────────────────────┤ │ POSPAR &POS1,&POS2,&POS3 │ │ . ∧ ∧ ∧ │ │ . │ │ │ │ │ MEND │ │ │ │ ├──────────────────────────┼─────┼─────┼─────────┤ │ . │ │ │ │ │ . 1 1 1 │ │ START │ │ │ │ │ . │ ┌──┘ ┌───┘ │ │ . │ │ │ │ Macro │ POSPAR ONE,TWO,THREE 2 │ Instruction │ . │ │ . │ │ END │ └────────────────────────────────────────────────┘ Notes:
Here are examples of macro instructions with positional operands:
The following list shows what happens when the number of positional
operands in the macro instruction is equal to or differs from the
number of positional parameters declared in the prototype statement
of the called macro definition:
|
Copyright IBM Corporation 1990, 2014
|