HLASM Language Reference

HLASM Language Reference HLASM Language Reference

faculty.cs.niu.edu
from faculty.cs.niu.edu More from this publisher
22.02.2015 Views

&SYSM_SEV System Variable Symbol &SYSM_SEV System Variable Symbol Use &SYSM_SEV to get the highest MNOTE severity code for the macro most recently called directly from this level. The global-scope system variable symbol &SYSM_SEV is assigned a read-only value. The assembler assigns a value of zero when a macro is called and when a macro returns (MEND or MEXIT), the highest severity of all MNOTE assembler instructions executed in the called macro is used to update the variable. Notes: 1. The value of the variable symbol is supplied as three numeric characters, not as an arithmetic (binary) value. 2. The value of the type attribute of &SYSM_SEV (T'&SYSM_SEV) is always N. 3. The value of the count attribute (K'&SYSM_SEV) is always 3. 4. The value of &SYSM_SEV is unreliable if any MNOTE is incorrectly coded such that a diagnostic message is generated for the MNOTE statement. The cause of the diagnostic message must be corrected. In Figure 71 on page 281 the &SYSM_SEV variable has a value of 0 until INNER returns. The OUTER macro uses &SYSM_SEV to determine which statements to generate, and in this case issues an MNOTE to pass the severity back to the open code. 280 HLASM V1R5 Language Reference

&SYSNDX System Variable Symbol 1 MACRO 2 OUTER &SEV 3 DC A(&SYSM_HSEV,&SYSM_SEV) outer 1 4 MNOTE &SEV,'OUTER - parm severity=&SEV' 5 DC A(&SYSM_HSEV,&SYSM_SEV) outer 2 6 INNER 7 DC A(&SYSM_HSEV,&SYSM_SEV) outer 3 8 AIF ('&SEV' GT '&SYSM_SEV').MN 9 MNOTE &SYSM_SEV,'OUTER - returned severity=&SYSM_SEV' 1 .MN ANOP 11 DC A(&SYSM_HSEV,&SYSM_SEV) outer 4 12 MEND 13 MACRO 14 INNER 15 DC A(&SYSM_HSEV,&SYSM_SEV) inner 1 16 MNOTE 8,'INNER' 17 DC A(&SYSM_HSEV,&SYSM_SEV) inner 2 18 MEND 4 19 E_G CSECT 2 ,OPEN CODE an mnote comment - sev= 21 DC A(&SYSM_HSEV,&SYSM_SEV) open_code + DC A(,) open_code 22 OUTER 4 8 23+ DC A(,) outer 1 ASMA254I MNOTE 24+ 4,OUTER - parm severity=4 1 4 25+ DC A(4,) outer 2 18 4 26+ DC A(4,) inner 1 ASMA254I MNOTE 27+ 8,INNER 2 8 28+ DC A(8,) inner 2 28 88 29+ DC A(8,8) outer 3 ASMA254I MNOTE 3+ 8,OUTER - returned severity=8 3 88 31+ DC A(8,8) outer 4 32 ,OPEN CODE an mnote comment - sev= 33 DC A(&SYSM_HSEV,&SYSM_SEV) open_code 38 88 + DC A(8,8) open_code 34 END Figure 71. Example of the behavior of the &SYSM_HSEV and &SYSM_SEV variables. &SYSNDX System Variable Symbol For each macro invocation, a new value of &SYSNDX is assigned. The previous value is incremented by 1. Thus, you can attach &SYSNDX to the end of a symbol inside a macro definition to generate a unique suffix for that symbol each time you call the definition. Although an apparently identical symbol is to be generated by two or more calls to the same definition, the suffix provided by &SYSNDX produces two or more unique symbols. For example, the symbol ABC&SYSNDX could generate ABC0001 on one invocation of a macro, and ABC0002 on the next invocation. Thus you avoid an error being flagged for multiply defined symbols. The local-scope system variable symbol &SYSNDX is assigned a read-only value each time a macro definition is called from a source module. The value assigned to &SYSNDX is a number from 1 to 9999999. For the numbers 0001 through 9999, four digits are generated. For the numbers 10000 through 9999999, the value is generated with no zeros to the left. The value 0001 is assigned to the first macro called by a program, and is incremented by one for each subsequent macro call (including nested macro calls). Chapter 7. How to Specify Macro Definitions 281

&SYSNDX System Variable Symbol<br />

1 MACRO<br />

2 OUTER &SEV<br />

3 DC A(&SYSM_HSEV,&SYSM_SEV) outer 1<br />

4 MNOTE &SEV,'OUTER - parm severity=&SEV'<br />

5 DC A(&SYSM_HSEV,&SYSM_SEV) outer 2<br />

6 INNER<br />

7 DC A(&SYSM_HSEV,&SYSM_SEV) outer 3<br />

8 AIF ('&SEV' GT '&SYSM_SEV').MN<br />

9 MNOTE &SYSM_SEV,'OUTER - returned severity=&SYSM_SEV'<br />

1 .MN ANOP<br />

11 DC A(&SYSM_HSEV,&SYSM_SEV) outer 4<br />

12 MEND<br />

13 MACRO<br />

14 INNER<br />

15 DC A(&SYSM_HSEV,&SYSM_SEV) inner 1<br />

16 MNOTE 8,'INNER'<br />

17 DC A(&SYSM_HSEV,&SYSM_SEV) inner 2<br />

18 MEND<br />

4 19 E_G CSECT<br />

2 ,OPEN CODE an mnote comment - sev=<br />

21 DC A(&SYSM_HSEV,&SYSM_SEV) open_code<br />

+ DC A(,) open_code<br />

22 OUTER 4<br />

8 23+ DC A(,) outer 1<br />

ASMA254I MNOTE 24+ 4,OUTER - parm severity=4<br />

1 4 25+ DC A(4,) outer 2<br />

18 4 26+ DC A(4,) inner 1<br />

ASMA254I MNOTE 27+ 8,INNER<br />

2 8 28+ DC A(8,) inner 2<br />

28 88 29+ DC A(8,8) outer 3<br />

ASMA254I MNOTE 3+ 8,OUTER - returned severity=8<br />

3 88 31+ DC A(8,8) outer 4<br />

32 ,OPEN CODE an mnote comment - sev=<br />

33 DC A(&SYSM_HSEV,&SYSM_SEV) open_code<br />

38 88 + DC A(8,8) open_code<br />

34 END<br />

Figure 71. Example of the behavior of the &SYSM_HSEV and &SYSM_SEV variables.<br />

&SYSNDX System Variable Symbol<br />

For each macro invocation, a new value of &SYSNDX is assigned. The previous<br />

value is incremented by 1. Thus, you can attach &SYSNDX to the end of a symbol<br />

inside a macro definition to generate a unique suffix for that symbol each time you<br />

call the definition. Although an apparently identical symbol is to be generated by<br />

two or more calls to the same definition, the suffix provided by &SYSNDX produces<br />

two or more unique symbols. For example, the symbol ABC&SYSNDX could<br />

generate ABC0001 on one invocation of a macro, and ABC0002 on the next<br />

invocation. Thus you avoid an error being flagged for multiply defined symbols.<br />

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

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

The value assigned to &SYSNDX is a number from 1 to 9999999. For the<br />

numbers 0001 through 9999, four digits are generated. For the numbers 10000<br />

through 9999999, the value is generated with no zeros to the left. The value 0001<br />

is assigned to the first macro called by a program, and is incremented by one for<br />

each subsequent macro call (including nested macro calls).<br />

Chapter 7. How to Specify Macro Definitions 281

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

Saved successfully!

Ooh no, something went wrong!