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

&SYSLOC System Variable Symbol To indicate the number of entries in nested sublists, specify the appropriate set of subscripts need to reference the selected sublist. Notes: 1. N'&SYSLIST includes any positional operands that are omitted. Positional operands are omitted by coding a comma where an operand is expected. 2. N'&SYSLIST(n) includes those sublist entries specifically omitted by specifying the comma that would normally have followed the entry. 3. If the operand indicated by n is not a sublist, N'&SYSLIST(n) is 1. If it is omitted, N'&SYSLIST(n) is 0. The COMPAT(SYSLIST) assembler option instructs the assembler to treat sublists in macro instruction operands as character strings, not sublists. See the HLASM Programmer's Guide for a description of the COMPAT(SYSLIST) assembler option. Examples of sublists: Macro Instruction N'&SYSLIST MACLST 1,2,3,4 4 MACLST A,B,,D,E 5 MACLST ,A,B,C,D 5 MACLST (A,B,C),(D,E,F) 2 MACLST MACLST KEY1=A,KEY2=B MACLST A,B,KEY1=C 2 MACSUB A,(1,2,3,4,5),B 5 MACSUB A,(1,,3,,5),B 5 MACSUB A,(,2,3,4,5),B 5 MACSUB A,B,C 1 MACSUB A,,C MACSUB A,(),C 1 MACSUB A,KEY=(A,B,C) MACSUB N'&SYSLIST(2) &SYSLOC System Variable Symbol Use &SYSLOC in a macro definition to generate the name of the location counter in effect. If you have not coded a LOCTR instruction between the macro instruction and the preceding START, CSECT, RSECT, DSECT, or COM instruction, the value of &SYSLOC is the same as the value of &SYSECT. The assembler assigns to the system variable symbol &SYSLOC a local read-only value each time a macro definition containing it is called. The value assigned is the symbol representing the name of the location counter in use at the point where the macro is called. &SYSLOC can only be used in macro definitions; it has local scope. 278 HLASM V1R5 Language Reference

&SYSMAC System Variable Symbol Notes: 1. The value of the type attribute of &SYSLOC (T'&SYSLOC) is always U. 2. The value of the count attribute (K'&SYSLOC) is equal to the number of characters assigned as a value to &SYSLOC. 3. Throughout the use of a macro definition, the value of &SYSLOC is considered a constant. &SYSMAC System Variable Symbol By varying the subscripts attached to the &SYSMAC you can refer to the name of any of the macros called between open code and the current nesting level, that is, &SYSMAC(&SYSNEST) returns 'OPEN CODE'. Valid subscripts are 0 to &SYSNEST. If &SYSMAC is used with a subscript greater than &SYSNEST, a null character string is returned. &SYSMAC with no subscript is treated as &SYSMAC(0) and so provides the name of the macro being expanded. This is not considered to be an error and so no message is issued. The local-scope system variable symbol &SYSMAC is assigned a read-only value each time a macro definition is called. Notes: 1. The value of the type attribute of &SYSMAC (T'&SYSMAC(n)) is U, unless &SYSMAC(n) is assigned a null character string, in which case the value of the type attribute is O. 2. The value of the count attribute (K'&SYSMAC(n)) is equal to the number of characters assigned as a value to &SYSMAC(n). &SYSM_HSEV System Variable Symbol Use &SYSM_HSEV to get the highest MNOTE severity so far for the assembly. The global-scope system variable symbol &SYSM_HSEV is assigned a read-only value. The assembler compares this value with the severity of MNOTE assembler instructions as they are encountered and, if lower, updates it with the higher value. 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_HSEV 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_HSEV variable is updated immediately when an MNOTE is issued with a higher severity. Chapter 7. How to Specify Macro Definitions 279

&SYSLOC System Variable Symbol<br />

To indicate the number of entries in nested sublists, specify the appropriate set<br />

of subscripts need to reference the selected sublist.<br />

Notes:<br />

1. N'&SYSLIST includes any positional operands that are omitted. Positional<br />

operands are omitted by coding a comma where an operand is expected.<br />

2. N'&SYSLIST(n) includes those sublist entries specifically omitted by specifying<br />

the comma that would normally have followed the entry.<br />

3. If the operand indicated by n is not a sublist, N'&SYSLIST(n) is 1. If it is<br />

omitted, N'&SYSLIST(n) is 0.<br />

The COMPAT(SYSLIST) assembler option instructs the assembler to treat sublists<br />

in macro instruction operands as character strings, not sublists. See the <strong>HLASM</strong><br />

Programmer's Guide for a description of the COMPAT(SYSLIST) assembler option.<br />

Examples of sublists:<br />

Macro Instruction<br />

N'&SYSLIST<br />

MACLST 1,2,3,4 4<br />

MACLST A,B,,D,E 5<br />

MACLST ,A,B,C,D 5<br />

MACLST (A,B,C),(D,E,F) 2<br />

MACLST<br />

<br />

MACLST KEY1=A,KEY2=B <br />

MACLST A,B,KEY1=C 2<br />

MACSUB A,(1,2,3,4,5),B 5<br />

MACSUB A,(1,,3,,5),B 5<br />

MACSUB A,(,2,3,4,5),B 5<br />

MACSUB A,B,C 1<br />

MACSUB A,,C <br />

MACSUB A,(),C 1<br />

MACSUB A,KEY=(A,B,C) <br />

MACSUB<br />

<br />

N'&SYSLIST(2)<br />

&SYSLOC System Variable Symbol<br />

Use &SYSLOC in a macro definition to generate the name of the location counter<br />

in effect. If you have not coded a LOCTR instruction between the macro instruction<br />

and the preceding START, CSECT, RSECT, DSECT, or COM instruction, the value<br />

of &SYSLOC is the same as the value of &SYSECT.<br />

The assembler assigns to the system variable symbol &SYSLOC a local read-only<br />

value each time a macro definition containing it is called. The value assigned is the<br />

symbol representing the name of the location counter in use at the point where the<br />

macro is called.<br />

&SYSLOC can only be used in macro definitions; it has local scope.<br />

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