11.07.2015 Views

HLASM: V1R6 Language Ref

HLASM: V1R6 Language Ref

HLASM: V1R6 Language Ref

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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Levels of macro call nestingLevels of macro call nestingThe code generated by a macro definition called by an inner macro call is nestedinside the code generated by the macro definition that contains the inner macrocall. In the macro definition called by an inner macro call, you can include a macrocall to another macro definition. Thus, you can nest macro calls at different levels.The &SYSNEST system variable indicates how many levels you called. It has thevalue 1 in an outer macro, and is incremented by one at a macro call.RecursionYou can also call a macro definition recursively; that is, you can write macroinstructions inside macro definitions that are calls to the containing definition. Thisis how you define macros to process recursive functions.General rules and restrictionsMacro instruction statements can be written inside macro definitions. Values aresubstituted in the same way as they are for the model statements of the containingmacro definition. The assembler processes the called macro definition, passing to itthe operand values (after substitution) from the inner macro instruction. Inaddition to the operand values described in “Values in operands” on page 305,nested macro calls can specify values that include:v Any of the symbolic parameters (see ▌1▐ in Figure 34) specified in the prototypestatement of the containing macro definitionv Any SET symbols (see ▌2▐ in Figure 34) declared in the containing macrodefinitionv Any of the system variable symbols such as &SYSDATE, &SYSTIME, etc. (see▌3▐ in Figure 34).310 <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!