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

&SYSLIST System Variable Symbol The local-scope system variable symbol &SYSLIN_VOLUME is assigned a read-only value each time a macro definition is called. If the assembler runs on the CMS component of the VM operating system, and the assembler listing is being written to a Shared File System CMS file, &SYSLIN_VOLUME is assigned the value SFS. If the volume on which the data set resides is not labeled, &SYSLIN_VOLUME is assigned a null character string. Notes: 1. If the OBJECT user exit provides the data set information then the value in &SYSLIN_VOLUME is the value extracted from the Exit-Specific Information block described in the HLASM Programmer's Guide. 2. The value of the type attribute of &SYSLIN_VOLUME (T'&SYSLIN_VOLUME) is U, unless &SYSLIN_VOLUME is assigned a null character string, in which case the value of the type attribute is O. 3. The value of the count attribute of &SYSLIN_VOLUME (K'&SYSLIN_VOLUME) is equal to the number of characters assigned as a value to &SYSLIN_VOLUME. If &SYSLIN_VOLUME is assigned a null character string, the value of the count attribute is 0. The maximum length of this system variable symbol is 6. &SYSLIST System Variable Symbol Use &SYSLIST instead of a positional parameter inside a macro definition; for example, as a point of substitution. By varying the subscripts attached to &SYSLIST, you can refer to any sublist entry in a macro call operand, or any positional operands in a macro call. You can also refer to positional operands for which no corresponding positional parameter is specified in the macro prototype statement. The local-scope system variable symbol &SYSLIST is assigned a read-only value each time a macro definition is called. &SYSLIST refers to the complete list of positional operands specified in a macro instruction. &SYSLIST does not refer to keyword operands. However, &SYSLIST cannot be specified as &SYSLIST without a subscript. One of the two following forms must be used for references or as a point of substitution: 1. &SYSLIST(n) can be used to refer to the n-th positional operand 2. If the n-th operand is a sublist, then &SYSLIST(n,m) can be used to refer to the m-th operand in the sublist. 3. When referring to multilevel (nested) sublists in operands of macro instructions, refer to elements of inner sublists by using the applicable number of subscripts for &SYSLIST. The subscripts n and m can be any arithmetic expression allowed in the operand of a SETA instruction (See “SETA Instruction” on page 347). The subscript n must be greater than or equal to 0. The subscript m and any additional subscripts after m must be greater than or equal to 1. 276 HLASM V1R5 Language Reference

&SYSLIST System Variable Symbol The examples below show the values assigned to &SYSLIST according to the value of its subscripts n and m. Macro instruction: ------------------ NAME MACALL ONE,TWO,(3,(4,5,6),,8),,TEN,() Use Within a Macro Definition: Value See note: --------------------- ------------ --------- &SYSLIST(2) TWO &SYSLIST(3,1) 3 &SYSLIST(3,2,2) 5 &SYSLIST(4) Null 1 &SYSLIST(12) Null 1 &SYSLIST(3,3) Null 2 &SYSLIST(3,5) Null 2 &SYSLIST(2,1) TWO 3 &SYSLIST(2,2) Null &SYSLIST() NAME 4 &SYSLIST(3) (3,(4,5,6),,8) &SYSLIST(11) () &SYSLIST(11,1) Null 2 Notes: 1. If the position indicated by n refers to an omitted operand, or refers to an entry past the end of the list of positional operands specified, the null character string is substituted for &SYSLIST(n). 2. If the position (in a sublist) indicated by the second subscript, m, refers to an omitted entry, or refers past the end of the list of entries specified in the sublist referred to by the first subscript n, the null character string is substituted for &SYSLIST(n,m). 3. If the n-th positional operand is not a sublist, &SYSLIST(n,1) refers to the operand. However, &SYSLIST(n,m), where m is greater than 1, will cause the null character string to be substituted. 4. If the value of subscript n is 0, then &SYSLIST(n) is assigned the value specified in the name field of the macro instruction, except when it is a sequence symbol. Attribute references can be made to the previously described forms of &SYSLIST. The attributes are the attributes inherent in the positional operands or sublist entries to which you refer. However, the number attribute of &SYSLIST (N'&SYSLIST) is different from the number attribute described in “Data Attributes” on page 324. One of two forms can be used for the number attribute: To indicate the number of positional operands specified in a call, use the form N'&SYSLIST. To indicate the number of sublist entries that have been specified in a positional operand, use the form N'&SYSLIST(n). Chapter 7. How to Specify Macro Definitions 277

&SYSLIST System Variable Symbol<br />

The examples below show the values assigned to &SYSLIST according to the<br />

value of its subscripts n and m.<br />

Macro instruction:<br />

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

NAME MACALL ONE,TWO,(3,(4,5,6),,8),,TEN,()<br />

Use Within a<br />

Macro Definition: Value See note:<br />

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

&SYSLIST(2)<br />

TWO<br />

&SYSLIST(3,1) 3<br />

&SYSLIST(3,2,2) 5<br />

&SYSLIST(4) Null 1<br />

&SYSLIST(12) Null 1<br />

&SYSLIST(3,3) Null 2<br />

&SYSLIST(3,5) Null 2<br />

&SYSLIST(2,1) TWO 3<br />

&SYSLIST(2,2)<br />

Null<br />

&SYSLIST() NAME 4<br />

&SYSLIST(3) (3,(4,5,6),,8)<br />

&SYSLIST(11) ()<br />

&SYSLIST(11,1) Null 2<br />

Notes:<br />

1. If the position indicated by n refers to an omitted operand, or refers to an entry<br />

past the end of the list of positional operands specified, the null character string<br />

is substituted for &SYSLIST(n).<br />

2. If the position (in a sublist) indicated by the second subscript, m, refers to an<br />

omitted entry, or refers past the end of the list of entries specified in the sublist<br />

referred to by the first subscript n, the null character string is substituted for<br />

&SYSLIST(n,m).<br />

3. If the n-th positional operand is not a sublist, &SYSLIST(n,1) refers to the<br />

operand. However, &SYSLIST(n,m), where m is greater than 1, will cause the<br />

null character string to be substituted.<br />

4. If the value of subscript n is 0, then &SYSLIST(n) is assigned the value<br />

specified in the name field of the macro instruction, except when it is a<br />

sequence symbol.<br />

Attribute references can be made to the previously described forms of &SYSLIST.<br />

The attributes are the attributes inherent in the positional operands or sublist entries<br />

to which you refer. However, the number attribute of &SYSLIST (N'&SYSLIST) is<br />

different from the number attribute described in “Data Attributes” on page 324.<br />

One of two forms can be used for the number attribute:<br />

To indicate the number of positional operands specified in a call, use the form<br />

N'&SYSLIST.<br />

To indicate the number of sublist entries that have been specified in a<br />

positional operand, use the form N'&SYSLIST(n).<br />

Chapter 7. How to Specify Macro Definitions 277

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

Saved successfully!

Ooh no, something went wrong!