Previous topic |
Next topic |
Contents |
Contact z/OS |
Library |
PDF
Macro definition HLASM Language Reference SC26-4940-06 |
|
A macro definition is a named sequence of statements you can call
with a macro instruction. When it is called, the assembler processes
and normally generates assembler language statements from the definition
into the source module. The statements generated can be:
You can define your own macro definitions in which any combination of these three processes can occur. Some macro definitions, like some of those used for system generation, do not generate assembler language statements, but do only internal processing. A macro definition provides the assembler with:
Every macro definition consists of a macro definition header statement (MACRO),
a macro instruction prototype statement, one or more assembler language
statements, and a macro definition trailer statement (MEND), as shown
in Figure 1.
Figure 1. Parts of a macro definition
┌──────────────────────────────> MACRO │ ┌────────────────────────────────────────────┐ │ Prototype │ &LABEL MACID &PARAM1,&PARAM2 │ │ │ └─┬─┘ └──────┬──────┘ │ │ │ 2 3 │ │ ┌ ├────────────────────────────────────────────┤ │ │ │ │ 1 │ │ │ │ │ │ │ │ 5 ─┤ │ Body of macro │ │ │ │ │ │ │ │ │ │ │ │ │ │ └ └────────────────────────────────────────────┘ └──────────────────────────────> MEND 4 ┌───────┴───────┐ Macro instruction MACID OPERAND1,OPERAND2
|
Copyright IBM Corporation 1990, 2014
|