Macro calls are NOT processed by substituting values into the
macro invocation statement and then processing the invocation.
They are processed by parsing the invocation statement first to
determine the syntax, then assigning the substituted values to
the appropriate parameters.

Similarly, even normal assembler statements are parsed as label,
opcode and operands before any substitution occurs.  There can
be substitution in each part, but it is not possible for a
substituted value to span different parts.  As a partial
exception, the substituted value for a machine instruction or an
assembler statement such as DC or DS can include remarks within
a substituted operand string, although any separate remarks will
not be processed for substitution.

This is all documented in the reference manual.

If you want to see what a macro invocation effectively looks
like, the option PCONTROL(MCALL) can be used to show each inner
macro call with its operands substituted.  However, this is not
a reliable indication of how the call will actually be
processed, as if substituted values contain text that looks like
more than one parameter, the output cannot show that.

The only way to issue a macro call where multiple operands are
substituted from a single variable is to use the AINSERT
statement, which will of course only take effect when control
returns to the open code level.

Jonathan Scott, HLASM
IBM Hursley, UK

Reply via email to