Ref: Your note of Tue, 7 Jul 2015 03:01:21 -0400
Macro calls are generally parsed BEFORE substitution, otherwise
quotes, spaces and commas in operands could cause lots of
problems.
To provide additional flexibility, HLASM allows an operand value
contained in a single macro parameter or SETC symbol to be parsed
into sublists, instead of treating each parameter simply as a
character string. The main purpose of this change was to allow
list operands to be passed through as lists to inner macros. For
compatibility with the previous assembler, Assembler H V2, the
option COMPAT(SYSLIST) was provided to force the old method. The
example in statement 20 illustrates this case and is affected by
this option.
Without COMPAT(SYSLIST):
> 18 &AA SETC '(1,2)'
> 19 T1 SYS=&AA
> 20+*,N'SYS=2, N'SYS(2)=1
With COMPAT(SYSLIST):
18 &AA SETC '(1,2)'
19 T1 SYS=&AA
20+*,N'SYS=1, N'SYS(2)=0
No such dynamic parsing function is provided for the case where
the operand is not a single symbol:
> 18 &AA SETC '(1,2)'
...
> 22 T1 SYS=(P1,&AA,P2)
> 23+*,N'SYS=3, N'SYS(2)=1
To get the results to match the substituted string in the last
case, you could put it all into a single variable:
25 &AA SETC '(P1,(1,2),P2)'
26 T1 SYS=&AA
27+*,N'SYS=3, N'SYS(2)=2
Jonathan Scott
IBM Hursley, UK