HLASM Language Reference
HLASM Language Reference HLASM Language Reference
&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
- Page 250 and 251: XATTR Instruction external_symbol i
- Page 252 and 253: XATTR Instruction SCOPE ►►─
- Page 254 and 255: XATTR Instruction 234 HLASM V1R5 La
- Page 256 and 257: Part 3. Macro Language &SYSDATC Sys
- Page 258 and 259: Introduction to Macro Language Chap
- Page 260 and 261: Introduction to Macro Language The
- Page 262 and 263: Introduction to Macro Language Macr
- Page 264 and 265: MACRO and MEND Statements The assem
- Page 266 and 267: Prototype Statement Macros that are
- Page 268 and 269: Model Statements generated from tha
- Page 270 and 271: Model Statements ▌5▐ ▌6▐
- Page 272 and 273: Model Statements Notes: 1. You can
- Page 274 and 275: Positional Parameters Symbolic para
- Page 276 and 277: Processing Statements Processing St
- Page 278 and 279: AREAD Instruction Assign Local Time
- Page 280 and 281: COPY Instruction sequence_symbol is
- Page 282 and 283: System Variable Symbols System Vari
- Page 284 and 285: &SYSADATA_MEMBER System Variable Sy
- Page 286 and 287: &SYSCLOCK System Variable Symbol &S
- Page 288 and 289: &SYSECT System Variable Symbol depe
- Page 290 and 291: &SYSIN_MEMBER System Variable Symbo
- Page 292 and 293: &SYSJOB System Variable Symbol &SYS
- Page 294 and 295: &SYSLIN_DSN System Variable Symbol
- Page 296 and 297: &SYSLIST System Variable Symbol The
- Page 298 and 299: &SYSLOC System Variable Symbol To
- Page 302 and 303: &SYSNDX System Variable Symbol The
- Page 304 and 305: &SYSOPT_DBCS System Variable Symbol
- Page 306 and 307: &SYSPARM System Variable Symbol Not
- Page 308 and 309: &SYSPRINT_MEMBER System Variable Sy
- Page 310 and 311: &SYSPUNCH_MEMBER System Variable Sy
- Page 312 and 313: &SYSSTEP System Variable Symbol Not
- Page 314 and 315: &SYSTERM_DSN System Variable Symbol
- Page 316 and 317: &SYSTIME System Variable Symbol Not
- Page 318 and 319: Macro Instruction Format sequence_s
- Page 320 and 321: Macro Instruction Format Operand En
- Page 322 and 323: Macro Instruction Format When you n
- Page 324 and 325: Sublists in Operands the order in w
- Page 326 and 327: Sublists in Operands &SYSLIST( n,m)
- Page 328 and 329: Values in Operands Notes: 1. Spaces
- Page 330 and 331: Values in Operands Parentheses In m
- Page 332 and 333: Inner and Outer Macro Instructions
- Page 334 and 335: Levels of Macro Call Nesting When t
- Page 336 and 337: Levels of Macro Call Nesting System
- Page 338 and 339: How to Write Conditional Assembly I
- Page 340 and 341: SET Symbols SET Symbol Specificatio
- Page 342 and 343: SET Symbols Figure 86 (Page 3 of 3)
- Page 344 and 345: Data Attributes this example indica
- Page 346 and 347: Data Attributes variable_symbol is
- Page 348 and 349: Data Attributes The value of an att
&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