11.07.2015 Views

HLASM: V1R6 Language Ref

HLASM: V1R6 Language Ref

HLASM: V1R6 Language Ref

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Where to define a macro in a source moduleFormat of a macro definitionOpen Code: Open code is that part of a source module that lies outside of anysource macro definition. At coding time, it is important to distinguish betweensource statements that lie in open code, and those that lie inside macro definitions.The general format of a macro definition is shown in Figure 26. The four parts aredescribed in detail in the following sections.┌─────────────────────────────────────────────────┐│ ┌───────────────────────────────────────────┐ ││ │ MACRO Header statement │ ││ └───────────────────────────────────────────┘ ││ ┌───────────────────────────────────────────┐ ││ │ ANYNAME Prototype statement│ ││ └───────────────────────────────────────────┘ ││ ┌───────────────────────────────────────────┐ ││ │ │ ││ │ Body of macro │ ││ │ │ ││ └───────────────────────────────────────────┘ ││ ┌───────────────────────────────────────────┐ ││ │ MEND Trailer statement │ ││ └───────────────────────────────────────────┘ │└─────────────────────────────────────────────────┘Macro definition header and trailerMACROFigure 26. Format of a macro definitionYou must establish the boundaries of a macro definition by coding:v A macro definition header statement as the first statement of the macrodefinition (a MACRO statement)v A macro definition trailer statement as the last statement of the macro definition(a MEND statement)The instructions used to define the boundaries of a macro instruction are describedin the following sections.statementUse the MACRO statement to indicate the beginning of a macro definition. It mustbe the first non-comment statement in every macro definition. Library macrodefinitions may have ordinary or internal macro comments before the MACROstatement.►► MACRO ►◄The MACRO statement must not have a name entry or an operand entry.242 <strong>HLASM</strong>: <strong>V1R6</strong> <strong>Language</strong> <strong>Ref</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!