|
This appendix summarizes the macro and conditional assembly language
described in Part 3 of this publication. Table 1 indicates
which macro and conditional assembly language elements can be used
in the name and operand entries of each statement. Table 3 summarizes
the expressions that can be used in macro instruction statements. Table 5 summarizes the attributes that can be used
in each expression. Table 6 summarizes the variable
symbols that can be used in each expression. Table 7 summarizes
the system variable symbols that can be used in each expression.
Table 1. Macro language elements (part 1)Statement |
Variable
Symbols |
Sequence
Symbol |
---|
Symbolic
Parameter |
Global-scope
SET Symbols² |
Local SET Symbols² |
---|
SETA |
SETB |
SETC |
SETA |
SETB |
SETC |
---|
MACRO |
|
|
|
|
|
|
|
|
Prototype
Statement
|
Name
Operand
|
|
|
|
|
|
|
|
GBLA |
Operand¹¹ |
Operand |
Operand¹¹ |
Operand¹¹ |
Operand¹¹ |
Operand¹¹ |
Operand¹¹ |
Name |
GBLB |
Operand¹¹ |
Operand¹¹ |
Operand |
Operand¹¹ |
Operand¹¹ |
Operand¹¹ |
Operand¹¹ |
Name |
GBLC |
Operand¹¹ |
Operand¹¹ |
Operand¹¹ |
Operand |
Operand¹¹ |
Operand¹¹ |
Operand¹¹ |
Name |
LCLA |
Operand¹¹ |
Operand¹¹ |
Operand¹¹ |
Operand¹¹ |
Operand |
Operand¹¹ |
Operand¹¹ |
Name |
LCLB |
Operand¹¹ |
Operand¹¹ |
Operand¹¹ |
Operand¹¹ |
Operand¹¹ |
Operand |
Operand¹¹ |
Name |
LCLC |
Operand¹¹ |
Operand¹¹ |
Operand¹¹ |
Operand¹¹ |
Operand¹¹ |
Operand¹¹ |
Operand |
Name |
Model
Statement
|
Name
Operation
Operand
|
Name
Operation
Operand
|
Name
Operation
Operand
|
Name
Operation
Operand
|
Name
Operation
Operand
|
Name
Operation
Operand
|
Name
Operation
Operand
|
Name |
SETA |
Name¹²
Operand³
|
Name
Operand
|
Name¹²
Operand⁴
|
Name¹²
Operand¹⁰
|
Name
Operand
|
Name¹²
Operand⁴
|
Name¹²
Operand¹⁰
|
|
SETAF |
Name¹²
Operand³,¹³
|
Name
Operand¹³
|
Name¹²
Operand⁴,¹³
|
Name¹⁰,¹²
Operand¹³
|
Name
Operand¹³
|
Name¹²
Operand⁴,¹³
|
Name¹⁰,¹²
Operand¹³
|
|
SETB |
Name¹²
Operand⁷
|
Name¹²
Operand⁷
|
Name
Operand
|
Name¹²
Operand⁷
|
Name¹²
Operand⁷
|
Name
Operand
|
Name¹²
Operand⁷
|
|
SETC |
Name¹²
Operand
|
Name¹²
Operand⁸
|
Name¹²
Operand⁹
|
Name
Operand
|
Name¹²
Operand⁸
|
Name¹²
Operand⁹
|
Name
Operand
|
Operand
|
SETCF |
Name¹²
Operand¹³
|
Name¹²
Operand⁸,¹³
|
Name¹²
Operand⁹,¹³
|
Name
Operand¹³
|
Name¹²
Operand⁸,¹³
|
Name¹²
Operand⁹,¹³
|
Name
Operand¹³
|
|
ACTR |
Operand³ |
Operand |
Operand⁴ |
Operand³ |
Operand |
Operand⁴ |
Operand³ |
Name |
AEJECT
|
|
|
|
|
|
|
|
Name |
AGO
|
|
|
|
|
|
|
|
Name
Operand
|
AIF |
Operand⁷ |
Operand⁷ |
Operand |
Operand⁷ |
Operand⁷ |
Operand |
Operand⁷ |
Name
Operand
|
ANOP
|
|
|
|
|
|
|
|
Name |
AREAD |
Name¹² |
Name¹² |
Name¹² |
Name |
Name¹² |
Name¹² |
Name |
|
ASPACE |
Operand³ |
Operand |
Operand⁴ |
Operand³ |
Operand |
Operand⁴ |
Operand³ |
Name |
MEXIT
|
|
|
|
|
|
|
|
Name |
MNOTE |
Operand |
Operand |
Operand |
Operand |
Operand |
Operand |
Operand |
Name |
MEND
|
|
|
|
|
|
|
|
Name |
Outer
Macro
|
|
Name
Operand
|
Name
Operand
|
Name
Operand
|
Name
Operand
|
Name
Operand
|
Name
Operand
|
Name |
Inner
Macro
|
Name
Operand
|
Name
Operand
|
Name
Operand
|
Name
Operand
|
Name
Operand
|
Name
Operand
|
Name
Operand
|
Name |
Notes: - Variable symbols in macro instructions are replaced by their values
before processing.
- Depending upon their values, system variable symbols with global
scope can be used in the same way as global SET symbols, and system
variable symbols with local scope can be used in the same way as local
SET symbols.
- Only if value is self-defining term.
- Converted to arithmetic 0 or 1.
- Only in character relations.
- Only in arithmetic relations.
- Only in arithmetic or character relations.
- Converted to an unsigned number.
- Converted to character 0 or 1.
- Only if one to ten decimal digits, not greater than 2147483647.
- Only in created SET symbols if value of parenthesized expression
is an alphabetic character followed by 0 to 61 alphanumeric characters.
- Only in created SET symbols (as described above) and in subscripts
(see SETA statement).
- The first operand of a SETAF or SETCF instruction must be a character
(SETC) expression containing or evaluating to an eight byte module
name.
|
Table 2. Macro language elements (part 2)Statement |
Attributes |
Type |
---|
Length |
Scale |
Integer |
Count |
Number |
Defined |
Operation Code |
|
---|
MACRO |
|
|
|
|
|
|
|
|
Prototype
Statement
|
|
|
|
|
|
|
|
|
GBLA |
|
|
|
|
|
|
|
|
GBLB |
|
|
|
|
|
|
|
|
GBLC |
|
|
|
|
|
|
|
|
LCLA |
|
|
|
|
|
|
|
|
LCLB |
|
|
|
|
|
|
|
|
LCLC |
|
|
|
|
|
|
|
|
Model
Statement
|
|
|
|
|
|
|
|
|
SETA |
|
Operand |
Operand |
Operand |
Operand |
Operand |
Operand |
|
SETAF |
|
Operand¹³ |
Operand¹³ |
Operand¹³ |
Operand¹³ |
Operand¹³ |
|
|
SETB |
Operand⁵ |
Operand⁶ |
Operand⁶ |
Operand⁶ |
Operand⁶ |
Operand⁶ |
Operand⁶ |
Operand⁵ |
SETC |
Operand |
|
|
|
|
|
|
Operand |
SETCF |
Operand¹³ |
|
|
|
|
|
|
|
ACTR |
|
Operand |
Operand |
Operand |
Operand |
Operand |
|
|
AEJECT |
|
|
|
|
|
|
|
|
AGO |
|
|
|
|
|
|
|
|
AIF |
Operand⁵ |
Operand⁶ |
Operand⁶ |
Operand⁶ |
Operand⁶ |
Operand⁶ |
Operand |
Operand |
ANOP |
|
|
|
|
|
|
|
|
AREAD |
|
|
|
|
|
|
|
|
ASPACE |
|
Operand |
Operand |
Operand |
Operand |
Operand |
|
|
MEXIT |
|
|
|
|
|
|
|
|
MNOTE |
|
|
|
|
|
|
|
|
MEND |
|
|
|
|
|
|
|
|
Outer
Macro
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Notes: - Variable symbols in macro instructions are replaced by their values
before processing.
- Depending upon their values, system variable symbols with global
scope can be used in the same way as global SET symbols, and system
variable symbols with local scope can be used in the same way as local
SET symbols.
- Only if value is self-defining term.
- Converted to arithmetic 0 or 1.
- Only in character relations.
- Only in arithmetic relations.
- Only in arithmetic or character relations.
- Converted to an unsigned number.
- Converted to character 0 or 1.
- Only if one to ten decimal digits, not greater than 2147483647.
- Only in created SET symbols if value of parenthesized expression
is an alphabetic character followed by 0 to 61 alphanumeric characters.
- Only in created SET symbols (as described above) and in subscripts
(see SETA statement).
- The first operand of a SETAF or SETCF instruction must be a character
(SETC) expression containing or evaluating to an eight byte module
name.
|
Table 3. Conditional
assembly expressionsExpression |
Arithmetic
Expressions
|
Character
Expressions
|
Logical
Expressions
|
---|
Can
contain
|
Self-defining terms Absolute, predefined ordinary symbols Length,
scale, integer, count, defined, and number attributes SETA and SETB
symbols SETC symbols whose values are a self-defining term Symbolic
parameters if the corresponding operand is a self-defining term Built-in
Functions &SYSDATC &SYSLIST(n) if
the corresponding operand is a self-defining term &SYSLIST (n,m)
if the corresponding operand is a self-defining term &SYSOPT_DBCS, &SYSOPT_RENT,
and &SYSOPT_XOBJECT &SYSM_HSEV and &SYSM_SEV &SYSNDX, &SYSNEST,
and &SYSSTMT |
Any combination of characters (including
double-byte characters, if the DBCS assembler option is specified)
enclosed in apostrophes Any variable symbol enclosed in apostrophes A
concatenation of variable symbols and other characters enclosed in
apostrophes Built-in Functions A type or operation code attribute
reference Substrings |
A 0 or a 1 Absolute, predefined ordinary symbols SETB symbols Arithmetic
relations Character relations Arithmetic value |
Operations |
+, - (unary and binary), *, and /; Parentheses permitted |
Concatenation, with a period (.), or by juxtaposition; substrings |
AND, OR, NOT, XOR Parentheses permitted |
Range of values |
-2³¹ to +2³¹-1 |
0 through 1024 characters |
0 (false) or 1 (true) |
Used in |
SETA operands Arithmetic relations Created SET symbols Subscripted
SET symbols &SYSLIST subscripts Substring notation Sublist notation |
SETC operands Character relations Created SET symbols |
SETB operands AIF operands Created SET symbols |
Built-in functions fall into the following categories:
Table 4. Built-in functionsValue Type |
Functions |
---|
Arithmetic |
AND, B2A, C2A, D2A, DCLEN, FIND, INDEX, NOT, OR, SLA, SLL,
SRA, SRL, X2A, XOR |
Logical |
AND, AND NOT, ISBIN, ISDEC, ISHEX, ISSYM, NOT, OR, OR NOT,
XOR, XOR NOT |
Character |
A2B, A2C, A2D, A2X, B2C, B2D, B2X, BYTE, C2B, C2D, C2X, D2B,
D2C, D2X, DCVAL, DEQUOTE, DOUBLE, LOWER, SIGNED, UPPER, X2B, X2C,
X2D |
Table 5. AttributesAttribute |
Notation |
Can be used with: |
Can be used only if
Type Attribute is:
|
Can be used in: |
---|
Type |
T' |
Ordinary symbols defined in open code; symbolic parameters
inside macro definitions; &SYSLIST(n), &SYSLIST(n,m)
inside macro definitions; SET symbols; all system variable symbols |
Any value |
SETC expressions Character relations
|
Length |
L' |
Ordinary symbols defined in open code; symbolic parameters
inside macro definitions; &SYSLIST(n),
and &SYSLIST(n,m)
inside macro definitions |
Any value except M, N, O, T, U |
SETA and ordinary arithmetic expressions |
Scale |
S' |
Ordinary symbols defined in open code; symbolic parameters
inside macro definitions; &SYSLIST(n),
and &SYSLIST(n,m)
inside macro definitions |
H,F,G,D,E,L,K,P, and Z |
SETA and ordinary arithmetic expressions |
Integer |
I' |
Ordinary symbols defined in open code; symbolic parameters
inside macro definitions; &SYSLIST(n),
and &SYSLIST(n,m)
inside macro definitions |
H,F,G,D,E,L,K,P, and Z |
SETA and ordinary arithmetic expressions |
Count |
K' |
Symbolic parameters inside macro definitions; &SYSLIST(n),
and &SYSLIST(n,m)
inside macro definitions; SET symbols; all system variable symbols |
Any letter or @ or $ |
SETA and ordinary arithmetic expressions |
Number |
N' |
Symbolic parameters, &SYSLIST and &SYSLIST(n)
inside macro definitions, with dimensioned SET symbols |
Any value |
SETA and ordinary arithmetic expressions |
Defined |
D' |
Ordinary symbols defined in open code; symbolic parameters
inside macro definitions; &SYSLIST and &SYSLIST(n)
inside macro definitions; SETC symbols whose value is an ordinary
symbol |
Any value except M, N, O, T, U |
SETA arithmetic expressions |
Operation Code |
O' |
A character string, or variable symbol containing a character
string. |
@, $, and any letter except N, O and (only sometimes) U |
SETC expressions Character relations
|
Refer to How to write conditional assembly instructions for usage restrictions
of the attributes in Table 5.
Table 6. Variable symbolsVariable
Symbol
|
Declared
by:
|
Initialized
or set to:
|
Value changed
by:
|
Can be used
in:
|
---|
Symbolic¹ parameter |
Prototype statement |
Corresponding macro instruction operand |
Constant throughout definition |
Arithmetic expressions if operand is self-defining term Character
expressions
|
SETA |
LCLA or GBLA instruction |
0 |
SETA instruction |
Arithmetic expressions Character expressions
Logical
expressions
|
SETB |
LCLB or GBLB instruction |
0 |
SETB instruction |
Arithmetic expressions Character expressions
Logical
expressions
|
SETC |
LCLC or GBLC instruction |
String of length 0 (null) |
SETC instruction |
Arithmetic expressions if value is self-defining term Character
expressions
Logical expressions if value is self-defining
term
|
Notes: - Can be used only in macro definitions.
|
Table 7. System
variable symbolsSystem Variable Symbol |
Avail- ability¹ |
Type² |
Type Attr.³ |
Scope |
Initialized or set to |
Value changed by |
Can be used in |
---|
&SYSADATA_DSN |
HLA2 |
C |
U,O |
L |
Current associated data file |
Constant throughout assembly |
Character expressions |
&SYSADATA_MEMBER |
HLA2 |
C |
U,O |
L |
Current associated data file member name |
Constant throughout assembly |
Character expressions |
&SYSADATA_VOLUME |
HLA2 |
C |
U,O |
L |
Current associated data file volume identifier |
Constant throughout assembly |
Character expressions |
&SYSASM |
HLA1 |
C |
U |
G |
Assembler name |
Constant throughout assembly |
Character expression |
&SYSCLOCK |
HLA3 |
C |
U |
L |
Current date and time |
Constant throughout macro expansion |
Character expressions |
&SYSDATC |
HLA1 |
C,A |
N |
G |
Assembly date (with century) |
Constant throughout assembly |
Arithmetic expressions Character expressions
|
&SYSDATE |
AsmH |
C |
U |
G |
Assembly date |
Constant throughout assembly |
Character expressions |
&SYSECT |
All |
C |
U |
L |
Name of control section in effect where macro instruction appears |
Constant throughout definition; set by START, CSECT, RSECT,
DSECT, or COM |
Character expressions |
&SYSIN_DSN |
HLA1 |
C |
U |
L |
Current primary input data set name |
Constant throughout definition |
Character expressions |
&SYSIN_MEMBER |
HLA1 |
C |
U,O |
L |
Current primary input member name |
Constant throughout definition |
Character expressions |
&SYSIN_VOLUME |
HLA1 |
C |
U,O |
L |
Current primary input volume identifier |
Constant throughout definition |
Character expressions |
&SYSJOB |
HLA1 |
C |
U |
G |
Source module assembly job name |
Constant throughout assembly |
Character expressions |
&SYSLIB_DSN |
HLA1 |
C |
U |
L |
Current macro library filename |
Constant throughout definition |
Character expressions |
&SYSLIB_MEMBER |
HLA1 |
C |
U,O |
L |
Current macro library member name |
Constant throughout definition |
Character expressions |
&SYSLIB_VOLUME |
HLA1 |
C |
U,O |
L |
Current macro library volume identifier |
Constant throughout definition |
Character expressions |
&SYSLIN_DSN |
HLA2 |
C |
U |
L |
Current object data set name |
Constant throughout assembly |
Character expressions |
&SYSLIN_MEMBER |
HLA2 |
C |
U,O |
L |
Current object data set member name |
Constant throughout assembly |
Character expressions |
&SYSLIN_VOLUME |
HLA2 |
C |
U,O |
L |
Current object data set volume identifier |
Constant throughout assembly |
Character expressions |
&SYSLIST |
All |
C |
any |
L |
Not applicable |
Not applicable |
N'&SYSLIST in arithmetic expressions |
&SYSLIST(n)&SYSLIST(n,m) |
All |
C |
any |
L |
Corresponding macro instruction operand |
Constant throughout definition |
Arithmetic expressions if operand is self-defining term Character
expressions
|
&SYSLOC |
AsmH |
C |
U |
L |
Location counter in effect where macro instruction appears |
Constant throughout definition; set by START, CSECT, RSECT,
DSECT, COM, and LOCTR |
Character expressions |
&SYSMAC |
HLA3 |
C |
U,O |
L |
Macro name |
Constant throughout definition |
Arithmetic expressions |
&SYSMAC(n)₁ |
HLA3 |
C |
U,O |
L |
Ancestor macro name |
Constant throughout definition |
Arithmetic expressions |
&SYSM_HSEV |
HLA3 |
A |
N |
G |
0 |
Mnote |
Arithmetic expressions |
&SYSM_SEV |
HLA3 |
A |
N |
G |
0 |
At nesting and unnesting of macros, from MNOTE |
Arithmetic expressions |
&SYSNDX |
All |
C |
N |
L |
Macro instruction index |
Constant throughout definition; unique for each macro instruction |
Arithmetic expressions Character expressions
|
&SYSNEST |
HLA1 |
A |
N |
L |
Macro instruction nesting level |
Constant throughout definition; unique for each macro nesting
level |
Arithmetic expressions Character expressions
|
&SYSOPT_DBCS |
HLA1 |
B |
N |
G |
DBCS assembler option indicator |
Constant throughout assembly |
Arithmetic expressions Character expressions
Logical
expressions
|
&SYSOPT_OPTABLE |
HLA3 |
C |
U |
G |
OPTABLE assembler option value |
Constant throughout assembly |
Character expressions |
&SYSOPT_RENT |
HLA1 |
B |
N |
G |
RENT assembler option indicator |
Constant throughout assembly |
Arithmetic expressions Character expressions
Logical
expressions
|
&SYSOPT_XOBJECT |
HLA3 |
B |
N |
G |
XOBJECT assembler option indicator |
Constant throughout assembly |
Arithmetic expressions Character expressions
Logical
expressions
|
&SYSPARM |
All |
C |
U,O |
G |
User defined or null |
Constant throughout assembly |
Arithmetic expressions if value is self-defining term Character
expressions
|
&SYSPRINT_DSN |
HLA2 |
C |
U |
L |
Current assembler listing data set name |
Constant throughout assembly |
Character expressions |
&SYSPRINT_MEMBER |
HLA2 |
C |
U,O |
L |
Current assembler listing data set member name |
Constant throughout assembly |
Character expressions |
&SYSPRINT_VOLUME |
HLA2 |
C |
U,O |
L |
Current assembler listing data set volume identifier |
Constant throughout assembly |
Character expressions |
&SYSPUNCH_DSN |
HLA2 |
C |
U |
L |
Current object data set name |
Constant throughout assembly |
Character expressions |
&SYSPUNCH_MEMBER |
HLA2 |
C |
U,O |
L |
Current object data set member name |
Constant throughout assembly |
Character expressions |
&SYSPUNCH_VOLUME |
HLA2 |
C |
U,O |
L |
Current object data set volume identifier |
Constant throughout assembly |
Character expressions |
&SYSSEQF |
HLA1 |
C |
U,O |
L |
Outer-most macro instruction identification- sequence field |
Constant throughout definition |
Character expressions |
&SYSSTEP |
HLA1 |
C |
U |
G |
Source module assembly job name |
Constant throughout assembly |
Character expressions |
&SYSSTMT |
HLA1 |
C,A |
N |
G |
Next statement number |
Assembler increments each time a statement is processed |
Arithmetic expressions Character expressions
|
&SYSSTYP |
HLA1 |
C |
U,O |
L |
Type of control section in effect where macro instruction appears |
Constant throughout definition; set by START, CSECT, RSECT,
DSECT, or COM |
Character expressions |
&SYSTEM_ID |
HLA1 |
C |
U |
G |
Assembly operating system environment identifier |
Constant throughout assembly |
Character expressions |
&SYSTERM_DSN |
HLA2 |
C |
U |
L |
Current terminal data set name |
Constant throughout assembly |
Character expressions |
&SYSTERM_MEMBER |
HLA2 |
C |
U,O |
L |
Current terminal data set member name |
Constant throughout assembly |
Character expressions |
&SYSTERM_VOLUME |
HLA2 |
C |
U,O |
L |
Current terminal data set volume identifier |
Constant throughout assembly |
Character expressions |
&SYSTIME |
AsmH |
C |
U |
G |
Source module assembly time |
Constant throughout assembly |
Character expressions |
&SYSVER |
HLA1 |
C |
U |
G |
Assembler release level |
Constant throughout assembly |
Character expressions |
Notes: - Availability:
- All
- All assemblers, including the DOS/VSE Assembler
- AsmH
- Assembler H Version 2 and High Level Assembler
- HLA1
- High Level Assembler Release 1
- HLA2
- High Level Assembler Release 2
- HLA3
- High Level Assembler Release 3
- HLA4
- High Level Assembler Release 4
- HLA5
- High Level Assembler Release 5
- Type:
- A
- Arithmetic
- B
- Boolean
- C
- Character
- Type Attr:
- N
- Numeric (self-defining term)
- O
- Omitted
- U
- Undefined, unknown, deleted, or unassigned
- Scope:
- L
- Local - only in macro
- G
- Global - in entire program
|
|