High Level Assembler for z/OS & z/VM & z/VSE. Language Reference (Version 1 Release 6) - page 16

 

  Главная      Manuals     High Level Assembler for z/OS & z/VM & z/VSE. Language Reference (Version 1 Release 6)

 

Search            copyright infringement  

 

 

 

 

 

 

 

 

 

 

 

Content      ..     14      15      16      17     ..

 

 

 

High Level Assembler for z/OS & z/VM & z/VSE. Language Reference (Version 1 Release 6) - page 16

 

 

might 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).
The maximum value for &SYSNDX can be controlled by the MHELP instruction
described under “MHELP Control on &SYSNDX:” on page 404.
Notes:
1. &SYSNDX does not generate a valid symbol, and it must:
v Follow the alphabetic character to which it is concatenated
v Be concatenated to a symbol containing 59 characters or fewer
2. The value of the type attribute of &SYSNDX (T'&SYSNDX) is always N.
3. The value of the count attribute (K'&SYSNDX) is equal to the number of digits
generated. If a symbol generated by one macro is to be referenced by code
generated by another macro, the two macros must provide means for
communicating the necessary information. Their respective values of &SYSNDX
cannot be guaranteed to differ by any fixed amount.
The example that follows shows the use of &SYSNDX, and a way to communicate
local &SYSNDX values among macro instructions. It is assumed that the first
macro instruction processed, OUTER1, is the 106th macro instruction processed by
the assembler.
MACRO
INNER1
GBLC
&NDXNUM
A&SYSNDX SR
2,5
Statement 1
CR
2,5
BE
B&NDXNUM
Statement 2
B
A&SYSNDX
Statement 3
MEND
MACRO
&NAME
OUTER1
GBLC
&NDXNUM
&NDXNUM SETC
’&SYSNDX’
Statement 4
&NAME
SR
2,4
AR
2,6
INNER1
Statement 5
B&SYSNDX S
2,=F’1000’
Statement 6
MEND
-------------------------------------------------------------------
ALPHA
OUTER1
Statement 7
BETA
OUTER1
Statement 8
-------------------------------------------------------------------
ALPHA
SR
2,4
AR
2,6
A0107
SR
2,5
CR
2,5
BE
B0106
B
A0107
B0106
S
2,=F’1000’
BETA
SR
2,4
Chapter 7. How to specify macro definitions
281
AR
2,6
A0109
SR
2,5
CR
2,5
BE
B0108
B
A0109
B0108
S
2,=F’1000’
Statement 7 is the 106th macro instruction processed. Therefore, &SYSNDX is
assigned the number 0106 for that macro instruction. The number 0106 is
substituted for &SYSNDX when it is used in statements 4 and 6. Statement 4 is
used to assign the character value 0106 to the SETC symbol &NDXNUM Statement 6 is
used to create the unique name B0106.
Statement 5 is the 107th macro instruction processed. Therefore, &SYSNDX is
assigned the number 0107 for that macro instruction. The number 0107 is
substituted for &SYSNDX when it is used in statements 1 and 3. The number 0106
is substituted for the global-scope SETC symbol &NDXNUM in statement 2.
Statement 8 is the 108th macro instruction processed. Therefore, each occurrence of
&SYSNDX is replaced by the number 0108. For example, statement 6 is used to
create the unique name B0108.
When statement 5 is used to process the 108th macro instruction, statement 5
becomes the 109th macro instruction processed. Therefore, each occurrence of
&SYSNDX is replaced by the number 0109. For example, statement 1 is used to
create the unique name A0109.
&SYSNEST System Variable Symbol
Use &SYSNEST to obtain the current macro instruction nesting level.
The local-scope system variable symbol &SYSNEST is assigned a read-only value
each time a macro definition is called from a source module.
The value assigned to &SYSNEST is a number from 1 to 99999999. No leading
zeros are generated as part of the number. When a macro is called from open code,
the value assigned to &SYSNEST is the number 1. Each time a macro definition is
called by an inner macro instruction, the value assigned to &SYSNEXT is
incremented by 1. Each time an inner macro exits, the value is decremented by 1.
Notes:
1. The value of the type attribute of &SYSNEST (T'&SYSNEST) is always N.
2. The value of the count attribute (K'&SYSNEST) is equal to the number of digits
assigned.
The following example shows the values assigned to &SYSNEST:
MACRO
OUTER
DC
A(&SYSNEST)
Statement 1
INNER1
Statement 2
INNER2
Statement 3
MEND
MACRO
INNER1
DC
A(&SYSNEST)
Statement 4
INNER2
Statement 5
MEND
282
HLASM V1R6 Language Reference
MACRO
INNER2
DC
A(&SYSNEST)
Statement 6
MEND
--------------------------------------------------------------------
OUTER
Statement 7
+
DC
A(1)
+
DC
A(2)
+
DC
A(3)
+
DC
A(2)
Statement 7 is in open code. It calls the macro OUTER. &SYSNEST is assigned a
value of 1 which is substituted in statement 1.
Statement 2, within the macro definition of OUTER, calls macro INNER1. The value
assigned to &SYSNEST is incremented by 1. The value 2 is substituted for
&SYSNEST in statement 4.
Statement 5, within the macro definition of INNER1, calls macro INNER2. The value
assigned to &SYSNEST is incremented by 1. The value 3 is substituted for
&SYSNEST in statement 6.
When the macro INNER2 exits, the value assigned to &SYSNEST is decremented by
1. The value of &SYNEST is 2.
When the macro INNER1 exits, the value assigned to &SYSNEST is decremented by
1. The value of &SYSNEST is 1.
Statement 3, within the macro definition of OUTER, calls macro INNER2. The value
assigned to &SYSNEST is incremented by 1. The value 2 is substituted for
&SYSNEST in statement 6.
|
&SYSOPT_CURR_OPTABLE System Variable Symbol
|
You can use &SYSOPT_CURR_OPTABLE to obtain the optable in use. The variable
|
is assigned a read-only value and can be used in open code. The value of
|
&SYSOPT_CURR_OPTABLE is a 3-character string. This variable is available on
|
z/OS, z/VM, z/VSE, and Linux for z Systems.
&SYSOPT_DBCS System Variable Symbol
You can use &SYSOPT_DBCS to determine if the DBCS assembler option was
supplied for the assembly of your source module. &SYSOPT_DBCS is a Boolean
system variable symbol, and has a global scope.
If the DBCS assembler option was specified, &SYSOPT_DBCS is assigned a value
of 1. If the DBCS assembler option was not specified, &SYSOPT_DBCS is assigned
a value of 0.
For more information about the DBCS assembler option, see the section “DBCS” in
the HLASM Programmer's Guide.
Notes:
1. The value of the type attribute of &SYSOPT_DBCS (T'&SYSOPT_DBCS) is
always N.
2. The value of the count attribute (K'&SYSOPT_DBCS) is always 1.
Chapter 7. How to specify macro definitions
283
&SYSOPT_OPTABLE System Variable Symbol
Use &SYSOPT_OPTABLE to determine the value that was specified for the
OPTABLE assembler option. &SYSOPT_OPTABLE has a global scope.
The value that was specified for the OPTABLE assembler option indicates which
operation code table was specified by the OPTABLE or MACHINE option.
For more information about the OPTABLE assembler option, see the section
“OPTABLE” in the HLASM Programmer's Guide).
Notes:
1. The value of the type attribute of &SYSOPT_OPTABLE (T'
&SYSOPT_OPTABLE) is always U.
2. The value of the count attribute (K'&SYSOPT_OPTABLE) is the number of
characters assigned.
&SYSOPT_RENT System Variable Symbol
Use &SYSOPT_RENT to determine if the RENT assembler option was specified for
the assembly of your source module. The RENT option instructs the assembler to
check for possible coding violations of program reenterability. &SYSOPT_RENT is
a Boolean system variable symbol, and has a global scope.
If the RENT assembler option was specified, &SYSOPT_RENT is assigned a value
of 1. If the RENT assembler option was not specified, &SYSOPT_RENT is assigned
a value of 0.
For more information about the RENT assembler option, see the section “RENT” in
the HLASM Programmer's Guide.
Notes:
1. The value of the type attribute of &SYSOPT_RENT (T'&SYSOPT_RENT) is
always N.
2. The value of the count attribute (K'&SYSOPT_RENT) is always 1.
&SYSOPT_XOBJECT System Variable Symbol
The &SYSOPT_XOBJECT system variable is set to 1 if GOFF or XOBJECT is
specified, otherwise it is set to 0.
&SYSOPT_XOBJECT is a Boolean system variable symbol with global scope.
Notes:
1. The value of the type attribute of &SYSOPT_XOBJECT (T'&SYSOPT_XOBJECT)
is always N.
2. The value of the count attribute (K'&SYSOPT_XOBJECT) is always 1.
&SYSPARM System Variable Symbol
The &SYSPARM system variable is assigned a read-only value from the assembler
option SYSPARM. It is treated as a global-scope SETC symbol in a source module
except that its value cannot be changed. (See the chapter “Controlling Your
Assembly with Options” in the HLASM Programmer's Guide for information about
assembler options.)
284
HLASM V1R6 Language Reference
Notes:
1. The largest value that &SYSPARM can hold is 4064 characters. However, if the
PARM field of the EXEC statement is used to specify its value, the PARM field
restrictions reduce its maximum possible length.
2. No values are substituted for variable symbols in the specified value, however,
on z/OS and z/VSE, you must use double ampersands to represent a single
ampersand.
3. On z/OS and z/VSE, you must use two apostrophes to represent an
apostrophes, because the entire EXEC PARM field is enclosed in apostrophes.
4. If the SYSPARM assembler option is not specified, &SYSPARM is assigned the
default value that was specified when the assembler was installed on your
system.
If a default value for SYSPARM was not specified when the assembler was
installed on your system, &SYSPARM is assigned a value of the null character
string.
5. The value of the type attribute of &SYSPARM (T'&SYSPARM) is U, unless
&SYSPARM is assigned a null value, in which case the value of the type
attribute is O.
6. The value of the count attribute (K'&SYSPARM) is the number of characters
assigned as a value to &SYSPARM. If &SYSPARM is assigned a null character
string, the value of the count attribute is 0.
7. If the SYSPARM option is passed to the assembler through the ASMAOPT file
(CMS and z/OS) or Librarian member (z/VSE) and the option contains
embedded spaces, it must be enclosed in quotes.
&SYSPRINT_DSN System Variable Symbol
Use &SYSPRINT_DSN in a macro definition to obtain the name of the data set to
which the assembler writes the assembler listing.
The local-scope system variable symbol &SYSPRINT_DSN is assigned a read-only
value each time a macro definition is called.
When the assembler runs on the z/OS operating systems, the value of the
character string assigned to &SYSPRINT_DSN is always the value stored in the
JFCB for SYSPRINT. If SYSPRINT is allocated to DUMMY, or a NULLFILE, the
value in &SYSPRINT_DSN is NULLFILE.
When the assembler runs on the CMS component of the VM operating systems,
the value of the character string assigned to &SYSPRINT_DSN is determined as
follows:
Table 43. Contents of &SYSPRINT_DSN on CMS
SYSPRINT Allocated To:
Contents of &SYSPRINT_DSN:
CMS file
The 8-character file name, the 8-character file
type, and the 2-character file mode of the
file, each separated by a space
Dummy file (no physical I/O)
DUMMY
Printer
PRINTER
Labeled tape file
The data set name of the tape file
Unlabeled tape file
TAPn, where n is a value from 0 to 9, or A to
F.
Chapter 7. How to specify macro definitions
285
Table 43. Contents of &SYSPRINT_DSN on CMS (continued)
SYSPRINT Allocated To:
Contents of &SYSPRINT_DSN:
Terminal
TERMINAL
When the assembler runs on z/VSE, the value of the character string assigned to
&SYSPRINT_DSN is determined as follows:
Table 44. Contents of &SYSPRINT_DSN on z/VSE
SYSLST Assigned To:
Contents of &SYSPRINT_DSN:
Disk file (not for dynamic partitions)
The file-id
Printer
SYSLST
Labeled tape file
The file ID of the tape file
Unlabeled tape file
SYSLST
Examples:
On z/OS, &SYSPRINT_DSN might be assigned a value such as:
IBMAPC.IBMAPCA.JOB06734.D0000102.?
On CMS, &SYSPRINT_DSN might be assigned a value such as:
SAMPLE LISTING A1
Notes:
1. If the LISTING user exit provides the listing data set information then the value
in &SYSPRINT_DSN is the value extracted from the Exit-Specific Information
block described in the section “Exit-Specific Information Block” in the HLASM
Programmer's Guide.
2. The value of the type attribute of &SYSPRINT_DSN (T'&SYSPRINT_DSN) is
always U.
3. The value of the count attribute of &SYSPRINT_DSN (K'&SYSPRINT_DSN) is
equal to the number of characters assigned as a value to &SYSPRINT_DSN.
&SYSPRINT_MEMBER System Variable Symbol
z/VSE The value of &SYSPRINT_MEMBER is always null.
The value of the type attribute is O, and the value of the count attribute is
0.
z/VM and z/OS
You can use &SYSPRINT_MEMBER in a macro definition to obtain the
name of the data set member to which the assembler is writing the
assembler listing.
The local-scope system variable symbol &SYSPRINT_MEMBER is assigned
a read-only value each time a macro definition is called.
If the data set to which the assembler is writing the assembler listing is not
a z/OS partitioned data set, &SYSPRINT_MEMBER is assigned a null
character string.
Notes:
286
HLASM V1R6 Language Reference
1. If the LISTING user exit provides the listing data set information then the value
in &SYSPRINT_MEMBER is the value extracted from the Exit-Specific
Information block described in the section “Exit-Specific Information Block” in
the HLASM Programmer's Guide.
2. The value of the type attribute of &SYSPRINT_MEMBER (T'
&SYSPRINT_MEMBER) is U, unless &SYSPRINT_MEMBER 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 &SYSPRINT_MEMBER
(K'&SYSPRINT_MEMBER) is equal to the number of characters assigned as a
value to &SYSPRINT_MEMBER. If &SYSPRINT_MEMBER is assigned a null
character string, the value of the count attribute is 0.
&SYSPRINT_VOLUME System Variable Symbol
Use &SYSPRINT_VOLUME in a macro definition to obtain the volume identifier of
the first volume containing the data set to which the assembler writes the
assembler listing.
The local-scope system variable symbol &SYSPRINT_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 writes to a Shared File System CMS file, &SYSPRINT_VOLUME
is assigned the value ** SFS.
If the volume on which the data set resides is not labeled, &SYSPRINT_VOLUME
is assigned a null character string.
Notes:
1. If the LISTING user exit provides the listing data set information then the value
in &SYSPRINT_VOLUME is the value extracted from the Exit-Specific
Information block described in the section “Exit-Specific Information Block” in
the HLASM Programmer's Guide.
2. The value of the type attribute of &SYSPRINT_VOLUME (T'
&SYSPRINT_VOLUME) is U, unless &SYSPRINT_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 &SYSPRINT_VOLUME
(K'&SYSPRINT_VOLUME) is equal to the number of characters assigned as a
value to &SYSPRINT_VOLUME. If &SYSPRINT_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.
&SYSPUNCH_DSN System Variable Symbol
Use &SYSPUNCH_DSN in a macro definition to obtain the name of the data set to
which the assembler is writing the object records when assembler option DECK is
specified.
The local-scope system variable symbol &SYSPUNCH_DSN is assigned a read-only
value each time a macro definition is called.
When the assembler runs on the z/OS operating systems, the value of the
character string assigned to &SYSPUNCH_DSN is always the value stored in the
JFCB for SYSPUNCH. If SYSPUNCH is allocated to DUMMY, or a NULLFILE, the
value in &SYSPUNCH_DSN is NULLFILE.
Chapter 7. How to specify macro definitions
287
When the assembler runs on the CMS component of the VM operating systems,
the value of the character string assigned to &SYSPUNCH_DSN is determined as
follows:
Table 45. Contents of &SYSPUNCH_DSN on CMS
SYSPUNCH Allocated To:
Contents of &SYSPUNCH_DSN:
CMS file
The 8-character file name, the 8-character file
type, and the 2-character file mode of the
file, each separated by a space
Dummy file (no physical I/O)
DUMMY
Punch
PUNCH
Labeled tape file
The data set name of the tape file
Unlabeled tape file
TAPn, where n is a value from 0 to 9, or A to
F.
On z/VSE, the value of the character string assigned to &SYSPUNCH_DSN is
determined as follows:
Table 46. Contents of &SYSPUNCH_DSN on z/VSE
SYSPCH Assigned To:
Contents of &SYSPUNCH_DSN:
Disk file
The file-id
Punch
SYSPCH
Labeled tape file
The file ID of the tape file
Unlabeled tape file
SYSPCH
Examples:
On z/OS, &SYSPUNCH_DSN might be assigned a value such as:
IBMAPC.IBMAPCA.JOB06734.D0000103.?
On CMS, &SYSPUNCH_DSN might be assigned a value such as:
PUNCH
Notes:
1. If the PUNCH user exit provides the punch data set information then the value
in &SYSPUNCH_DSN is the value extracted from the Exit-Specific Information
block described in the section “Exit-Specific Information Block” in the HLASM
Programmer's Guide.
2. The value of the type attribute of &SYSPUNCH_DSN (T'&SYSPUNCH_DSN) is
always U.
3. The value of the count attribute of &SYSPUNCH_DSN (K'&SYSPUNCH_DSN)
is equal to the number of characters assigned as a value to &SYSPUNCH_DSN.
&SYSPUNCH_MEMBER System Variable Symbol
z/VSE The value of &SYSPUNCH_MEMBER is always null.
The value of the type attribute is O, and the value of the count attribute is
0.
z/VM and z/OS
You can use &SYSPUNCH_MEMBER in a macro definition to obtain the
288
HLASM V1R6 Language Reference
name of the data set member to which the assembler is writing the object
records when the assembler option DECK is specified.
The local system variable symbol &SYSPUNCH_MEMBER is assigned a
read-only value each time a macro definition is called.
If the data set to which the assembler is writing the object records is not a
z/OS partitioned data set, &SYSPUNCH_MEMBER is assigned a null
character string.
Notes:
1. If the PUNCH user exit provides the punch data set information then the value
in &SYSPUNCH_MEMBER is the value extracted from the Exit-Specific
Information block described in the section “Exit-Specific Information Block” in
the HLASM Programmer's Guide.
2. The value of the type attribute of &SYSPUNCH_MEMBER
(T'&SYSPUNCH_MEMBER) is U, unless &SYSPUNCH_MEMBER 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 &SYSPUNCH_MEMBER
(K'&SYSPUNCH_MEMBER) is equal to the number of characters assigned as a
value to &SYSPUNCH_MEMBER. If &SYSPUNCH_MEMBER is assigned a null
character string, the value of the count attribute is 0.
&SYSPUNCH_VOLUME System Variable Symbol
Use &SYSPUNCH_VOLUME in a macro definition to obtain the volume identifier
of the object data set. The volume identifier is of the first volume containing the
data set. &SYSPUNCH_VOLUME is only assigned a value when you specify the
DECK assembler option.
The local-scope system variable symbol &SYSPUNCH_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
object records are being written to a Shared File System CMS file,
&SYSPUNCH_VOLUME is assigned the value ** SFS.
If the volume on which the data set resides is not labeled, &SYSPUNCH_VOLUME
is assigned a null character string.
Notes:
1. If the PUNCH user exit provides the punch data set information then the value
in &SYSPUNCH_VOLUME is the value extracted from the Exit-Specific
Information block described in the section “Exit-Specific Information Block” in
the HLASM Programmer's Guide.
2. The value of the type attribute of &SYSPUNCH_VOLUME
(T'&SYSPUNCH_VOLUME) is U, unless &SYSPUNCH_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 &SYSPUNCH_VOLUME
(K'&SYSPUNCH_VOLUME) is equal to the number of characters assigned as a
value to &SYSPUNCH_VOLUME. If &SYSPUNCH_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.
Chapter 7. How to specify macro definitions
289
&SYSSEQF System Variable Symbol
Use &SYSSEQF in a macro definition to obtain the value of the
identification-sequence field of the macro instruction in open code that caused,
directly or indirectly, the macro to be called.
The local-scope system variable symbol &SYSSEQF is assigned a read-only value
each time a macro definition is called from a source module.
The value assigned to &SYSSEQF is determined as follows:
1. If no ICTL instruction has been specified and sequence checking is not active,
the contents of columns 73 to 80 inclusive of the source statement are assigned
to &SYSSEQF.
2. If an ICTL instruction has been specified, but sequence checking is not active,
the contents of the columns of the source statement to the right of the
continuation-indicator column are assigned to &SYSSEQF. If the end column or
the continuation-indicator column is 80, &SYSSEQF is assigned a null character
string.
3. If an ISEQ instruction with operands has been specified to start sequence
checking, the contents of columns specified in the ISEQ instruction operand are
assigned to &SYSSEQF.
4. If an ISEQ instruction without an operand has been specified to end sequence
checking, steps (1) and (2) are used to determine the value assigned to
&SYSSEQF.
Notes:
1. The value of the type attribute of &SYSSEQF (T'&SYSSEQF) is U, unless
&SYSSEQF is assigned a null character string, in which case the value of the
type attribute is O.
2. The value of the count attribute of &SYSSEQF (K'&SYSSEQF) is equal to the
number of characters assigned as a value to &SYSSEQF. If &SYSSEQF is
assigned a null character string, the value of the count attribute is 0.
3. Throughout the use of a macro definition, the value of &SYSSEQF is considered
a constant.
&SYSSTEP System Variable Symbol
Use &SYSSTEP to obtain the step name of the job step used to assemble your
source module. &SYSSTEP has a global scope.
On CMS and z/VSE the value of &SYSSTEP is always (NOSTEP).
Notes:
1. The value of the type attribute of &SYSSTEP (T'&SYSSTEP) is always U.
2. The value of the count attribute (K'&SYSSTEP) is the number of characters
assigned.
&SYSSTMT System Variable Symbol
Use &SYSSTMT to obtain the next statement number that is assigned to a
statement by the assembler. &SYSSTMT has a global scope.
290
HLASM V1R6 Language Reference
The value assigned to &SYSSTMT is an 8-character string, padded on the left with
leading zero (X'F0') characters. The following example shows the value assigned to
&SYSSTMT. It assumes that the DC statement is in open code, and is the 23rd
statement in the source module.
23
DC
C’&SYSSTMT’
+
DC
C’00000024’
Notes:
1. The value of the type attribute of &SYSSTMT (T'&SYSSTMT) is always N.
2. The value of the count attribute of &SYSSTMT (K'&SYSSTMT) is always 8.
&SYSSTYP System Variable Symbol
Use &SYSSTYP in a macro definition to generate the type of the current control
section. The current control section is the control section in which the macro
instruction that calls the definition appears.
The local-scope system variable symbol &SYSSTYP is assigned a read-only value
each time a macro definition is called.
The value assigned is the symbol that represents the type of the current control
section in effect when the macro is called. A control section that has been initiated
or continued by substitution does not affect the value of &SYSSTYP for the
expansion of the current macro. However, it does affect &SYSSTYP for a
subsequent macro call. Nested macros cause the assembler to assign a value to
&SYSSTYP that depends on the control section in force inside the calling macro
when the inner macro is called.
The control section whose type is assigned to &SYSSTYP can be defined by a
program sectioning statement. This can be a START, CSECT, RSECT, DSECT, or
COM statement, or, for the first control section, any instruction described in “First
control section” on page 55. Depending upon the instruction used to initiate the
current control section, the value assigned to &SYSSTYP is either CSECT, RSECT,
DSECT, or COM. If the current control section is unnamed, or is an executable
control section initiated by other than a START, CSECT, or RSECT instruction, then
the value assigned to &SYSSTYP is CSECT.
If a control section has not been initiated, &SYSSTYP is assigned a null character
string.
Notes:
1. The value of the type attribute of &SYSSTYP (T'&SYSSTYP) is U, unless
&SYSSTYP is assigned a null character string, in which case the value of the
type attribute is O.
2. The value of the count attribute of &SYSSTYP (K'&SYSSTYP) is equal to the
number of characters assigned as a value to &SYSSTYP. If &SYSSTYP is
assigned a null character string, the value of the count attribute is 0.
3. Throughout the use of a macro definition, the value of &SYSSTYP is considered
a constant.
&SYSTEM_ID System Variable Symbol
Use &SYSTEM_ID to obtain the name and release of the operating system under
which your source module is being assembled. &SYSTEM_ID has a global scope.
For example, on z/OS, &SYSTEM_ID might contain one of the following:
Chapter 7. How to specify macro definitions
291
z/OS 01.04.00
z/OS 01.05.00
... and so on
on CMS, &SYSTEM_ID might contain one of the following:
CMS 18
CMS 19
... and so on
on z/VSE, &SYSTEM_ID might contain one of the following:
VSE/AF 6.6.0
... and so on
Notes:
1. The value of the type attribute of &SYSTEM_ID (T'&SYSTEM_ID) is always U.
2. The value of the count attribute (K'&SYSTEM_ID) is the number of characters
assigned.
&SYSTERM_DSN System Variable Symbol
Use &SYSTERM_DSN in a macro definition to obtain the name of the data set to
which the assembler is writing the terminal records.
The local-scope system variable symbol &SYSTERM_DSN is assigned a read-only
value each time a macro definition is called.
When the assembler runs on the z/OS operating systems, the value of the
character string assigned to &SYSTERM_DSN is always the value stored in the
JFCB for SYSTERM. If SYSTERM is allocated to DUMMY, or a NULLFILE, the
value in &SYSTERM_DSN is NULLFILE.
When the assembler runs on the CMS component of the z/VM operating systems,
the value of the character string assigned to &SYSTERM_DSN is determined as
follows:
Table 47. Contents of &SYSTERM_DSN on CMS
SYSTERM Allocated To:
Contents of &SYSTERM_DSN:
CMS file
The 8-character file name, the 8-character file
type, and the 2-character file mode of the
file, each separated by a space
Dummy file (no physical I/O)
DUMMY
Printer
PRINTER
Labeled tape file
The data set name of the tape file
Unlabeled tape file
TAPn, where n is a value from 0 to 9, or A to
F.
Terminal
TERMINAL
On z/VSE, the value of the character string assigned to &SYSTERM_DSN is
always SYSLOG.
Examples:
On z/OS, &SYSTERM_DSN might be assigned a value such as:
IBMAPC.IBMAPCA.JOB06734.D0000104.?
292
HLASM V1R6 Language Reference
On CMS, &SYSTERM_DSN might be assigned a value such as:
TERMINAL
Notes:
1. If the TERM user exit provides the terminal data set information then the value
in &SYSTERM_DSN is the value extracted from the Exit-Specific Information
block described in the section “Exit-Specific Information Block” in the HLASM
Programmer's Guide.
2. The value of the type attribute of &SYSTERM_DSN (T'&SYSTERM_DSN) is
always U.
3. The value of the count attribute of &SYSTERM_DSN (K'&SYSTERM_DSN) is
equal to the number of characters assigned as a value to &SYSTERM_DSN.
&SYSTERM_MEMBER System Variable Symbol
z/VSE The value of &SYSTERM_MEMBER is always null.
The value of the type attribute is O, and the value of the count attribute is
0.
z/VM and z/OS
You can use &SYSTERM_MEMBER in a macro definition to obtain the
name of the data set member to which the assembler is writing the
terminal records.
The local-scope system variable symbol &SYSTERM_MEMBER is assigned
a read-only value each time a macro definition is called.
If the data set to which the assembler is writing the terminal records is not
a z/OS partitioned data set, &SYSTERM_MEMBER is assigned a null
character string.
Notes:
1. If the TERM user exit provides the terminal data set information then the value
in &SYSTERM_MEMBER is the value extracted from the Exit-Specific
Information block described in the section “Exit-Specific Information Block” in
the HLASM Programmer's Guide.
2. The value of the type attribute of &SYSTERM_MEMBER (T'
&SYSTERM_MEMBER) is U, unless &SYSTERM_MEMBER 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 &SYSTERM_MEMBER (K'
&SYSTERM_MEMBER) is equal to the number of characters assigned as a value
to &SYSTERM_MEMBER. If &SYSTERM_MEMBER is assigned a null character
string, the value of the count attribute is 0.
&SYSTERM_VOLUME System Variable Symbol
z/VSE The value of &SYSTERM_VOLUME is always null.
The value of the type attribute is U, and the value of the count attribute is
0.
z/VM and z/OS
You can use &SYSTERM_VOLUME in a macro definition to obtain the
volume identifier of the first volume containing the data set to which the
assembler is writing the terminal records.
Chapter 7. How to specify macro definitions
293
The local-scope system variable symbol &SYSTERM_VOLUME is assigned
a read-only value each time a macro definition is called.
If the assembler runs on the CMS component of the z/VM operating
system, and the terminal records are being written to a Shared File System
CMS file, &SYSTERM_VOLUME is assigned the value “** SFS”.
If the volume on which the data set resides is not labeled,
&SYSTERM_VOLUME is assigned a null character string.
Notes:
1. If the TERM user exit provides the terminal data set information then the value
in &SYSTERM_VOLUME is the value extracted from the Exit-Specific
Information block described in the section “Exit-Specific Information Block” in
the HLASM Programmer's Guide.
2. The value of the type attribute of &SYSTERM_VOLUME (T'
&SYSTERM_VOLUME) is U, unless &SYSTERM_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 &SYSTERM_VOLUME (K'
&SYSTERM_VOLUME) is equal to the number of characters assigned as a
value to &SYSTERM_VOLUME. If &SYSTERM_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.
&SYSTIME System Variable Symbol
Use &SYSTIME to obtain the time at which your source module is assembled. It
has local scope, but can be used in open code. It is assigned a read-only value.
The value of &SYSTIME is a 5-character string in the format:
HH.MM
where:
HH Is two-digit field that gives the hour of the day. It has a value 00 - 23.
MM Is two-digit field that gives the minute of the hour. It has a value 00 - 59. It
is separated from HH by a period.
Example:
09.45
Notes:
1. The time corresponds to the time printed in the page heading of listings and
remains constant for each assembly.
2. The value of the type attribute of &SYSTIME (T'&SYSTIME) is always U.
3. The value of the count attribute (K'&SYSTIME) is always 5.
&SYSVER System Variable Symbol
Use &SYSVER to obtain the version, release, and modification level of the
assembler being used to assemble your source module. &SYSVER has a global
scope. For example, when High Level Assembler 6 is used, &SYSVER has the
value “1.6.0”.
Notes:
1. The value of the type attribute of &SYSVER (T'&SYSVER) is always U.
294
HLASM V1R6 Language Reference
2. The value of the count attribute (K'&SYSVER) is the number of characters
assigned. In the example where the value of &SYSVER is “1.6.0”, the count
attribute of &SYSVER is 5.
Chapter 7. How to specify macro definitions
295
296
HLASM V1R6 Language Reference
Chapter
8. How to write macro instructions
This chapter describes macro instructions; where you can use them and how you
specify them.
The first section, “Macro instruction format” describes the macro instruction
format, including details on the name, operation, and operand entries, and what is
generated as a result of a macro instruction.
“Sublists in operands” on page 304 describes how you can use sublists to specify
several values in an operand entry.
“Values in operands” on page 307 describes the values you can specify in an
operand entry when you call a macro definition.
“Nesting macro instruction definitions” on page 310 describes how you can use
nested macro call instructions to call macros from within a macro.
What is a Macro Instruction: The macro instruction provides the assembler with:
v The name of the macro definition to process
v The information or values to pass to the macro definition
This information is the input to a macro definition. The assembler uses the
information either in processing the macro definition, or for substituting values
into model statements in the definition.
The output from a macro definition can be:
v A sequence of statements generated from the model statements of the macro for
further processing at assembly time.
v Values assigned to global-scope SET symbols. These values can be used in other
macro definitions and in open code (see “SET symbols” on page 320).
Where Macro Instructions Can Appear: A macro instruction can be written
anywhere in your program, provided the assembler can find the macro definition.
The macro definition can be found either in a macro library, or in the source
program before the macro instruction, or be provided by a LIBRARY user exit.
However, the statements generated from the called macro definition must be valid
assembler language instructions and allowed where the calling macro instruction
appears.
Macro instruction format
►►
operation_code
►◄
name_entry
,
sequence_symbol
operand
297
name_entry
Is a special positional operand that can be used to pass a value into the called
macro definition. For a detailed description of what form name_entry can take,
see “Name entry” on page 299.
sequence_symbol
Is a sequence symbol. If a sequence symbol is coded in the name entry of a
macro instruction, the value of the symbol is not passed to the called macro
definition and therefore cannot be used as a value for substitution in the macro
definition.
operation_code
Is the symbolic operation code which identifies the macro definition that you
want the assembler to process. For more information, see “Operation entry” on
page 299.
operand
The positional operands or keyword operands that you use to pass values into
the called macro definition. For more information, see “Operand entry” on
page 300.
If no operands are specified in the operand field, and if the absence of the operand
entry is indicated by a comma preceded and followed by one or more spaces,
remarks are allowed.
The entries in the name, operation, and operand fields correspond to entries in the
prototype statement of the called macro definition (see “Macro instruction
prototype” on page 247).
Alternative formats for a macro instruction
A macro instruction can be specified in one of the three following ways:
v The normal way, with the operands preceding any remarks
v The alternative way, allowing remarks for each operand
v A combination of the first two ways
The alternative statement format is not available for machine instructions.
The following example shows the normal statement format (NAME1), the
alternative statement format (NAME2), and a combination of both statement
formats (NAME3).
Opera-
Name tion Operand
Comment
Cont.
NAME1
OP1
OPERAND1,OPERAND2,OPERAND3
This is the normal
X
statement format
NAME2
OP2
OPERAND1,
This is the alter-
X
OPERAND2
native statement format
NAME3
OP3
OPERAND1,
This is a combination
X
OPERAND2,OPERAND3
of both
Notes:
1. Any number of continuation lines are allowed. However, each continuation line
must be indicated by a non-space character in the column after the end column
of the previous statement line (see “Continuation lines” on page 16).
298
HLASM V1R6 Language Reference
2. If the DBCS assembler option is specified, the continuation features outlined in
“Continuation of double-byte data” on page 17 apply to continuation in the
macro language. Extended continuation might be useful if a macro operand
contains double-byte data.
3. Operands on continuation lines must begin in the continue column (column
16), or the assembler assumes that the current line and any lines that follow
contain remarks.
If any entries are made in the columns before the continue column in
continuation lines, the assembler issues an error message and the whole
statement is not processed.
4. One or more spaces must separate the operand from the remarks.
5. A comma after an operand indicates more operands follow.
6. The last operand requires no comma following it, but using a comma does not
cause an error.
7. You do not need to use the same format when you code a macro instruction as
you use when you code the corresponding macro prototype statement.
8. Continued comments for a macro with an operand list that terminates in a null
operand are recognized provided each continued comment begins in the same
or later column as the preceding line's comment.
Name entry
Use the name entry of a macro instruction to:
v Pass a value into a macro definition through the name entry declared in the
macro definition
v Provide a conditional assembly label (see “Sequence symbols” on page 339) so
that you can branch to the macro instruction during conditional assembly if you
want the called macro definition expanded.
The name entry of a macro instruction can be:
v Space
v An ordinary symbol, such as HERE
v A variable symbol, such as &A.
v Any combination of variable symbols and other character strings concatenated
together, such as HERE.&A
v Any character string allowed in a macro instruction operand, such as ’Now is
the hour’ or STRING00, excluding sublist entries and certain attribute references
(see “Values in operands” on page 307)
v A sequence symbol, which is not passed to the macro definition, such as .SEQ
Operation entry
The operation entry is the symbolic name of the operation code that identifies a
macro definition to process.
The operation entry must be a valid symbol, and must be identical to the operation
field in the prototype statement of the macro definition.
The assembler searches for source macro definitions before library macro
definitions. If you have a source macro definition that has the same name as a
library macro definition, the assembler only processes the source macro definition.
Chapter 8. How to write macro instructions
299
You can use a variable symbol as a macro instruction. For example if MAC1 has been
defined as a macro, you can use the following statements to call it:
&CALL
SETC
’MAC1’
&CALL
You cannot use a variable symbol as a macro instruction that passes operands to
the macro. The second statement in the following example generates an error:
&CALL
SETC
’MAC1 OPERAND1=VALUE’
&CALL
You must specify operand entries after the variable symbol, as shown in the
following example:
&CALL
SETC
’MAC1’
&CALL OPERAND1=VALUE
Operand entry
Use the operand entry of a macro instruction to pass values into the called macro
definition. These values can be passed through:
v The symbolic parameters you have specified in the macro prototype.
v The system variable symbol &SYSLIST if it is specified in the body of the macro
definition (see “&SYSLIST System Variable Symbol” on page 276).
The two types of operands allowed in a macro instruction are positional and
keyword operands. You can specify a sublist with multiple values in both types of
operands. Special rules for the various values you can specify in operands are
given in the following subsections.
Positional operands
You can use a positional operand to pass a value into a macro definition through
the corresponding positional parameter declared for the definition. Declare a
positional parameter in a macro definition when you want to change the value
passed at every call to that macro definition.
You can also use a positional operand to pass a value to the system variable
symbol &SYSLIST. If &SYSLIST, with the applicable subscripts, is specified in a
macro definition, you do not need to declare positional parameters in the
prototype statement of the macro definition. You can thus use &SYSLIST to refer to
any positional operand. This allows you to vary the number of operands you
specify each time you call the same macro definition.
The positional operands of a macro instruction must be specified in the same order
as the positional parameters declared in the called macro definition.
Each positional operand constitutes a character string. This character string is the
value passed through a positional parameter into a macro definition.
The specification for each positional parameter in the prototype statement
definition must be a valid variable symbol. Values are assigned (see ▌1▐) to the
positional operands by the corresponding positional arguments see ▌2▐ below)
specified in the macro instruction that calls the macro definition.
300
HLASM V1R6 Language Reference

 

 

 

 

 

 

 

Content      ..     14      15      16      17     ..