Ref:  Your note of Wed, 20 Mar 2013 12:02:22 +0000

It is important to remember that macro statements are NOT
processed by substituting variables within the original macro
invocation statement before it is parsed, because this would then
cause all sorts of odd effects when substituted variables
happened to contain syntactically interesting characters such as
spaces, equals signs, commas, parentheses and apostrophes.
Instead, the macro invocation is parsed when the source is first
encountered, BEFORE the values are substituted, and when the
macro is invoked, substitution is applied within individual
parameter values.

For the special case where you want to pass something through
unchanged, it might be possible for HLASM to implement a function
to interpret a line dynamically, like AINSERT but within the
current macro.  However, even if this were done, the results
might not be as expected, as this again would interpret any
syntactically interesting characters within the substituted
values as part of the syntax of the macro call rather than
passing through the values.

For this reason, the only reliable way to pass through positional
parameters to an inner macro at present is to use their
individual names or to use separate &SYSLIST(n) entries as
suggested by John Ehrman.

John Bodoh wrote:
> I like the idea of a new symbol; maybe &SYSARGS that is a read-only symbol 
> that is the entire argument to a macro including both
> keyword and positional parameters.  It would only have a scope of the current 
> macro.  Thus, I could use it as a parameter to an
> sub-macro being invoked: MACROX  ...,&SYSARGS.
>
> I would be very surprised if I were the first person in the world in need of 
> such a capability.
>
> John Bodoh

Jonathan Scott
HLASM Development, IBM Hursley, UK

Reply via email to