22.02.2015 Views

HLASM Language Reference

HLASM Language Reference

HLASM Language Reference

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Sublists in Operands<br />

&SYSLIST( n,m): The system variable symbol, &SYSLIST(n,m), can also refer to<br />

sublist entries, but only if the sublist is specified in a positional operand.<br />

Figure 81. Relationship between Subscripted Parameters and Sublist Entries<br />

Parameter<br />

Sublist specified in<br />

corresponding operand<br />

or as default value<br />

of a keyword parameter<br />

Value generated or<br />

used in computation<br />

▌1▐ &PARM1(3) (1,2,,4) Null character string<br />

▌2▐ &PARM1(5) (1,2,3,4) Null character string<br />

&PARM1<br />

▌3▐ &PARM1(1)<br />

&PARM1(2)<br />

▌4▐ &PARM1<br />

&PARM1(1)<br />

▌2▐ &PARM1(2)<br />

A<br />

A<br />

A<br />

(A)<br />

(A)<br />

(A)<br />

A<br />

A<br />

Null character string<br />

(A)<br />

A<br />

Null character string<br />

&PARM1<br />

&PARM1(1)<br />

&PARM1(2)<br />

&PARM1(2)<br />

()<br />

()<br />

()<br />

(A, ,C,D)<br />

()<br />

Null character string<br />

Null character string<br />

Nothing<br />

Notes:<br />

&PARM1(1)<br />

&PARM1<br />

&PARM2(3)<br />

&SYSLIST(2,3)<br />

1. Considered a sublist.<br />

( )<br />

A,(1,2,3,4)<br />

A,(1,2,3,4)<br />

A,(1,2,3,4)<br />

2. The space indicates the end of the operand field.<br />

Nothing<br />

3. Produces error diagnostic message ASMA88E Unbalanced parentheses in<br />

macro call operand.<br />

4. Positional operands.<br />

A<br />

3<br />

3<br />

Multilevel Sublists<br />

You can specify multilevel sublists (sublists within sublists) in macro operands. The<br />

depth of this nesting is limited only by the constraint that the total operand length<br />

| must not exceed 1024 characters. Inner elements of the sublists are referenced<br />

using additional subscripts on symbolic parameters or on &SYSLIST.<br />

N'&SYSLIST(n) gives the number of operands in the indicated n-th level sublist.<br />

The number attribute (N') and a parameter name with an n-element subscript array<br />

gives the number of operands in the indicated (n+1)-th operand sublist. Figure 82<br />

shows the value of selected elements if &P is the first positional parameter, and the<br />

value assigned to it in a macro instruction is (A,(B,(C)),D).<br />

306 <strong>HLASM</strong> V1R5 <strong>Language</strong> <strong>Reference</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!