HLASM Language Reference
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Source and library macro definitions

HLASM Language Reference
SC26-4940-06

You can include a macro definition in a source module. This type of definition is called a source macro definition, or, sometimes, an in-line macro definition.

You can also insert a macro definition into a system or user library by using the applicable utility program. This type of definition is called a library macro definition. The IBM-supplied macro definitions are examples of library macro definitions.

You can call a source macro definition only from the source module in which it is included. You can call a library macro definition from any source module if the library containing the macro definition is available to the assembler.

Syntax errors in processing statements are handled differently for source macro definitions and library macro definitions. In source macro definitions, error messages are listed following the statements in error. In library macros, however, error messages cannot be associated with the statement in error, because the statements in library macro definitions are not included in the assembly listing. Therefore, the error messages are listed directly following the first call of that macro.

Because of the difficulty of finding syntax errors in library macros, run and "debug" a macro definition as a source macro before placing it in a macro library. Alternatively, use the LIBMAC assembler option to have the assembler automatically include the source statements of the library macro in your source module. For more information about the LIBMAC option, see the section "LIBMAC" in the HLASM Programmer's Guide.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014