Macro and conditional assembly language summary
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 | Operand11 | Operand | Operand11 | Operand11 | Operand11 | Operand11 | Operand11 | Name |
GBLB | Operand11 | Operand11 | Operand | Operand11 | Operand11 | Operand11 | Operand11 | Name |
GBLC | Operand11 | Operand11 | Operand11 | Operand | Operand11 | Operand11 | Operand11 | Name |
LCLA | Operand11 | Operand11 | Operand11 | Operand11 | Operand | Operand11 | Operand11 | Name |
LCLB | Operand11 | Operand11 | Operand11 | Operand11 | Operand11 | Operand | Operand11 | Name |
LCLC | Operand11 | Operand11 | Operand11 | Operand11 | Operand11 | Operand11 | 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 | Name12 Operand3 | Name Operand | Name12 Operand4 | Name12 Operand10 | Name Operand | Name12 Operand4 | Name12 Operand10 | |
SETAF | Name12 Operand3, 13 | Name Operand13 | Name12 Operand4,13 | Name10,12Operand13 | Name Operand13 | Name12 Operand4,13 | Name10,12 Operand13 | |
SETB | Name12 Operand7 | Name12 Operand7 | Name Operand | Name12 Operand7 | Name12 Operand7 | Name Operand | Name12 Operand7 | |
SETC | Name12 Operand | Name12 Operand8 | Name12 Operand9 | Name Operand | Name12 Operand8 | Name12 Operand9 | Name Operand | Operand |
SETCF | Name12 Operand13 | Name12 Operand8,13 | Name12 Operand9,13 | Name Operand13 | Name12 Operand8,13 | Name12 Operand9,13 | Name Operand13 | |
ACTR | Operand3 | Operand | Operand4 | Operand3 | Operand | Operand4 | Operand3 | Name |
AEJECT | Name | |||||||
AINSERT | Operand | Operand | Operand | Operand | Operand | Operand | Operand | Name |
AGO | Name Operand | |||||||
AIF | Operand7 | Operand7 | Operand | Operand7 | Operand7 | Operand | Operand7 | Name Operand |
ANOP | Name | |||||||
AREAD | Name12 | Name12 | Name12 | Name | Name12 | Name12 | Name | |
ASPACE | Operand3 | Operand | Operand4 | Operand3 | Operand | Operand4 | Operand3 | 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:
|
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 | Operand13 | Operand13 | Operand13 | Operand13 | Operand13 | |||
SETB | Operand5 | Operand6 | Operand6 | Operand6 | Operand6 | Operand6 | Operand6 | Operand5 |
SETC | Operand | Operand | ||||||
SETCF | Operand13 | |||||||
ACTR | Operand | Operand | Operand | Operand | Operand | |||
AEJECT | ||||||||
AGO | ||||||||
AIF | Operand5 | Operand6 | Operand6 | Operand6 | Operand6 | Operand6 | Operand | Operand |
ANOP | ||||||||
AREAD | ||||||||
ASPACE | Operand | Operand | Operand | Operand | Operand | |||
MEXIT | ||||||||
MNOTE | ||||||||
MEND | ||||||||
Outer Macro | ||||||||
Notes:
|
Expression |
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 &SYS_HLASM_DATE &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 4064 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:
Value 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 |
Attribute | 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 |
Variable
Symbol |
Declared
by: |
Initialized
or set to: |
Value changed
by: |
Can be used
in: |
---|---|---|---|---|
Symbolic1 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:
|
System Variable Symbol | Avail- ability¹ | Type² | Type Attr.³ | Scope | Initialized or set to | Value changed by | Can be used in |
---|---|---|---|---|---|---|---|
&SYS_HLASM_DATE | HLA6 | C,A | N | G | PTF build date | Constant throughout assembly | Arithmetic expressions Character expressions |
&SYS_HLASM_PTF | HLA6 | C | U | G | PTF level | Constant throughout assembly | Character expressions |
&SYS_HLASM_RPM | HLA6 | C | U | G | RPM level | Constant throughout assembly | Character expressions |
&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, CATTR, 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_ASCII | HLA6 | C,A | N | G | xxx option value | Constant throughout assembly | Arithmetic expressions Character expressions |
&SYSOPT_CA | HLA6 | C,A | N | G | xxx option value | ACONTROL xxx statements | Arithmetic expressions Character expressions |
&SYSOPT_CE | HLA6 | C,A | N | G | xxx option value | ACONTROL xxx statements | Arithmetic expressions Character expressions |
&SYSOPT_CODEPAGE | HLA6 | C,A | N | G | xxx option value | Constant throughout assembly | Arithmetic expressions Character expressions |
&SYSOPT_CU | HLA6 | C,A | N | G | xxx option value | ACONTROL xxx statements | Arithmetic expressions Character expressions |
&SYSOPT_CURR_OPTABLE | HLA6 | C | U | G | Current OPTABLE | ACONTROL OPTABLE statements | Character expressions |
&SYSOPT_DBCS | HLA1 | B | N | G | DBCS assembler option indicator | Constant throughout assembly | Arithmetic expressions Character expressions Logical expressions |
&SYSOPT_EBCDIC | HLA6 | C,A | N | G | xxx option value | Constant throughout assembly | Arithmetic expressions Character 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_UNICODE | HLA6 | C,A | N | G | xxx option value | Constant throughout assembly | Arithmetic expressions Character 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 step 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:
|