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.

&SYSECT System Variable Symbol<br />

depends on the control section in force inside the outer macro when the inner<br />

macro is called.<br />

Notes:<br />

1. The control section whose name is assigned to &SYSECT can be defined by a<br />

program sectioning statement. This can be a START, CSECT, RSECT,<br />

DSECT, or COM statement.<br />

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

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

characters assigned as a value to &SYSECT.<br />

4. Throughout the use of a macro definition, the value of &SYSECT is considered<br />

a constant, independent of any program sectioning statements or inner macro<br />

instructions in that definition.<br />

The next example shows these rules:<br />

MACRO<br />

INNER<br />

&INCSECT<br />

&INCSECT CSECT Statement 1<br />

DC A(&SYSECT) Statement 2<br />

MEND<br />

MACRO<br />

OUTER1<br />

CSOUT1 CSECT Statement 3<br />

DS<br />

1C<br />

INNER INA Statement 4<br />

INNER INB Statement 5<br />

DC A(&SYSECT) Statement 6<br />

MEND<br />

MACRO<br />

OUTER2<br />

DC A(&SYSECT) Statement 7<br />

MEND<br />

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

MAINPROG CSECT Statement 8<br />

DS<br />

2C<br />

OUTER1 Statement 9<br />

OUTER2<br />

Statement 1<br />

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

Generated Program<br />

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

MAINPROG CSECT<br />

DS<br />

2C<br />

CSOUT1 CSECT<br />

DS<br />

1C<br />

INA CSECT<br />

DC<br />

A(CSOUT1)<br />

INB CSECT<br />

DC<br />

A(INA)<br />

DC<br />

A(MAINPROG)<br />

DC<br />

A(INB)<br />

In this example:<br />

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