HLASM General Information
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


The macro language

HLASM General Information
GC26-4943-06

The macro language is an extension of the assembler language. It provides a convenient way to generate a preferred sequence of assembler language statements many times in one or more programs. There are two parts to the macro language supported by High Level Assembler:
Macro definition
A named sequence of statements you call with a macro instruction. The name of the macro is the symbolic operation code used in the macro instruction. Macro definitions can appear anywhere in your source module; they can even be nested within other macro definitions. Macros can also be redefined at a later point in your program.
Macro instruction
Calls the macro definition for processing. A macro instruction can pass information to the macro definition which the assembler uses to process the macro.
There are two types of macro definition:
Source macro definition
A macro definition defined in your source program.
Library macro definition
A macro definition that resides in a library data set.

Either type of macro definition can be called from anywhere in the source module by a macro instruction, however a source macro definition must occur before it is first called.

You use a macro prototype statement to define the name of the macro and the symbolic parameters you can pass it from a macro instruction.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014