Multilevel sublists in macro instruction operands

Multilevel sublists (sublists within sublists) are permitted in macro instruction operands and in the keyword default values in prototype statements, as shown in the following:
          MAC1 (A,B,(W,X,(R,S,T),Y,Z),C,D)
          MAC2 &KEY=(1,12,(8,4),64)

The depth of this nesting is limited only by the constraint that the total length of an individual operand cannot exceed 1024 characters.

To access individual elements at any level of a multilevel operand, you use additional subscripts after &SYSLIST or the symbolic parameter name. Table 1 shows the value of selected elements if &P is the first positional parameter and the value assigned to it in a macro instruction is (A,(B,(C)),D).


Table 1. Multilevel sublists
Selected Elements from &P Selected Elements from &SYSLIST Value of Selected Element
&P
&P(1)
&P(2)
&P(2,1)
&P(2,2)
&P(2,2,1)
&P(2,2,2)
N'&P(2,2)
N'&P(2)
N'&P(3)
N'&P
 
&SYSLIST(1)
&SYSLIST(1,1)
&SYSLIST(1,2)
&SYSLIST(1,2,1)
&SYSLIST(1,2,2)
&SYSLIST(1,2,2,1)
&SYSLIST(1,2,2,2)
N'&SYSLIST(1,2,2)
N'&SYSLIST(1,2)
N'&SYSLIST(1,3)
N'&SYSLIST(1)
 
(A,(B,(C)),D)
A
(B,(C))
B
(C)
C
null
1
2
1
3
 

Sublists may also be assigned to SETC symbols and used in macro instruction operands. However, if you specify the COMPAT(SYSLIST) assembler option, the assembler treats sublists in SETC symbols as character strings, not sublists, when used in the operand of macro instructions.