Appendix C. Macro and conditional assembly language summary

This appendix summarizes the macro and conditional assembly language described in Part 3 of this publication. Table 67 indicates which macro and conditional assembly language elements may be used in the name and operand entries of each statement. Table 69 summarizes the expressions that may be used in macro instruction statements. Table 71 summarizes the attributes that may be used in each expression. Table 72 summarizes the variable symbols that may be used in each expression. Table 73 summarizes the system variable symbols that may be used in each expression.

Table 67. Macro language elements (part 1)
Statement Variable Symbols Sequence Symbol
Symbolic Parameter Global-scope SET Symbols2 Local SET Symbols2
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,12
Operand13
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
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:
  1. Variable symbols in macro instructions are replaced by their values before processing.
  2. 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.
  3. Only if value is self-defining term.
  4. Converted to arithmetic 0 or 1.
  5. Only in character relations.
  6. Only in arithmetic relations.
  7. Only in arithmetic or character relations.
  8. Converted to an unsigned number.
  9. Converted to character 0 or 1.
  10. Only if one to ten decimal digits, not greater than 2147483647.
  11. Only in created SET symbols if value of parenthesized expression is an alphabetic character followed by 0 to 61 alphanumeric characters.
  12. Only in created SET symbols (as described above) and in subscripts (see SETA statement).
  13. 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 68. 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   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:
  1. Variable symbols in macro instructions are replaced by their values before processing.
  2. 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.
  3. Only if value is self-defining term.
  4. Converted to arithmetic 0 or 1.
  5. Only in character relations.
  6. Only in arithmetic relations.
  7. Only in arithmetic or character relations.
  8. Converted to an unsigned number.
  9. Converted to character 0 or 1.
  10. Only if one to ten decimal digits, not greater than 2147483647.
  11. Only in created SET symbols if value of parenthesized expression is an alphabetic character followed by 0 to 61 alphanumeric characters.
  12. Only in created SET symbols (as described above) and in subscripts (see SETA statement).
  13. 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 69. Conditional assembly expressions
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
 
&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 single quotation marks
 
Any variable symbol enclosed in single quotation marks
 
A concatenation of variable symbols and other characters enclosed in single quotation marks
 
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
-231 to +231-1 0 through 1024 characters 0 (false) or 1 (true)
Used in SETA operands
 
Arithmetic relations
 
Created SET symbols
 
Subscripted SET symbols
 
&SYSLIST subscript(s)
 
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 70. Built-in functions
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
Table 71. Attributes
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

Refer to How to write conditional assembly instructions for usage restrictions of the attributes in Table 71.

Table 72. Variable symbols
Variable
Symbol
Declared
by:
Initialized
or set to:
Value changed
by:
May 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:
  1. Can be used only in macro definitions.
Table 73. System variable symbols
System Variable Symbol Avail- ability1 Type2 Type Attr.3 Scope Initialized or set to Value changed by May 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 jobname 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)1 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:
  1. 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
  2. Type:
    A
    Arithmetic
    B
    Boolean
    C
    Character
  3. Type Attr:
    N
    Numeric (self-defining term)
    O
    Omitted
    U
    Undefined, unknown, deleted or unassigned
  4. Scope:
    L
    Local - only in macro
    G
    Global - in entire program

[ Top of Page | Previous Page | Next Page | Contents | Index ]