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.

&SYSNDX System Variable Symbol<br />

The maximum value for &SYSNDX can be controlled by the MHELP instruction<br />

described under “MHELP Control on &SYSNDX” on page 398.<br />

Notes:<br />

1. &SYSNDX does not generate a valid symbol, and it must:<br />

Follow the alphabetic character to which it is concatenated<br />

Be concatenated to a symbol containing 59 characters or fewer<br />

2. The value of the type attribute of &SYSNDX (T'&SYSNDX) is always N.<br />

3. The value of the count attribute (K'&SYSNDX) is equal to the number of digits<br />

generated. If a symbol generated by one macro is to be referenced by code<br />

generated by another macro, the two macros must provide means for<br />

communicating the necessary information. Their respective values of &SYSNDX<br />

cannot be guaranteed to differ by any fixed amount.<br />

The example that follows shows the use of &SYSNDX, and a way to communicate<br />

local &SYSNDX values among macro instructions. It is assumed that the first<br />

macro instruction processed, OUTER1, is the 106th macro instruction processed by<br />

the assembler.<br />

MACRO<br />

INNER1<br />

GBLC<br />

&NDXNUM<br />

A&SYSNDX SR 2,5 Statement 1<br />

CR 2,5<br />

BE B&NDXNUM Statement 2<br />

B A&SYSNDX Statement 3<br />

MEND<br />

MACRO<br />

&NAME OUTER1<br />

GBLC<br />

&NDXNUM<br />

&NDXNUM SETC '&SYSNDX' Statement 4<br />

&NAME SR 2,4<br />

AR 2,6<br />

INNER1 Statement 5<br />

B&SYSNDX S 2,=F'1' Statement 6<br />

MEND<br />

-------------------------------------------------------------------<br />

ALPHA OUTER1 Statement 7<br />

BETA OUTER1 Statement 8<br />

-------------------------------------------------------------------<br />

ALPHA SR 2,4<br />

AR 2,6<br />

A17 SR 2,5<br />

CR 2,5<br />

BE<br />

B16<br />

B<br />

A17<br />

B16 S 2,=F'1'<br />

BETA SR 2,4<br />

AR 2,6<br />

A19 SR 2,5<br />

CR 2,5<br />

BE<br />

B18<br />

B<br />

A19<br />

B18 S 2,=F'1'<br />

282 <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!