22.02.2015 Views

HLASM Language Reference

HLASM Language Reference

HLASM Language Reference

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

&SYSNEST System Variable Symbol<br />

Statement 7 is the 106th macro instruction processed. Therefore, &SYSNDX is<br />

assigned the number 0106 for that macro instruction. The number 0106 is<br />

substituted for &SYSNDX when it is used in statements 4 and 6. Statement 4 is<br />

used to assign the character value 16 to the SETC symbol &NDXNUM Statement 6<br />

is used to create the unique name B16.<br />

Statement 5 is the 107th macro instruction processed. Therefore, &SYSNDX is<br />

assigned the number 17 for that macro instruction. The number 17 is<br />

substituted for &SYSNDX when it is used in statements 1 and 3. The number 16<br />

is substituted for the global-scope SETC symbol &NDXNUM in statement 2.<br />

Statement 8 is the 108th macro instruction processed. Therefore, each occurrence<br />

of &SYSNDX is replaced by the number 18. For example, statement 6 is used to<br />

create the unique name B18.<br />

When statement 5 is used to process the 108th macro instruction, statement 5<br />

becomes the 109th macro instruction processed. Therefore, each occurrence of<br />

&SYSNDX is replaced by the number 19. For example, statement 1 is used to<br />

create the unique name A19.<br />

&SYSNEST System Variable Symbol<br />

Use &SYSNEST to obtain the current macro instruction nesting level.<br />

The local-scope system variable symbol &SYSNEST is assigned a read-only value<br />

each time a macro definition is called from a source module.<br />

The value assigned to &SYSNEST is a number from 1 to 99999999. No leading<br />

zeros are generated as part of the number. When a macro is called from open<br />

code, the value assigned to &SYSNEST is the number 1. Each time a macro<br />

definition is called by an inner macro instruction, the value assigned to &SYSNEXT<br />

is incremented by 1. Each time an inner macro exits, the value is decremented by<br />

1.<br />

Notes:<br />

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

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

assigned.<br />

The following example shows the values assigned to &SYSNEST:<br />

Chapter 7. How to Specify Macro Definitions 283

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

Saved successfully!

Ooh no, something went wrong!