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 describes how you can use sublists to specify several values in an operand entry.
Values in operands describes the values you can specify in an operand entry when you call a macro definition.
Nesting macro instruction definitions describes how you can use nested macro call instructions to call macros from within a macro.
- The name of the macro definition to process
- 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.
- A sequence of statements generated from the model statements of the macro for further processing at assembly time.
- Values assigned to global-scope SET symbols. These values can be used in other macro definitions and in open code (see SET symbols).
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.