Multilevel sublists
You can specify multilevel sublists (sublists within sublists) in macro operands. The depth of this nesting is limited only by the constraint that the total operand length must not exceed 4064 characters. Inner elements of the sublists are referenced using additional subscripts on symbolic parameters or on &SYSLIST.
N'&SYSLIST(n) gives the number of operands in the indicated n-th level sublist. The number attribute (N') and a parameter name with an n-element subscript array gives the number of operands in the indicated (n+1)-th operand sublist. 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).
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 |