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.

Macro instruction formatOperandYou can use a variable symbol as a macro instruction. For example if MAC1 has beendefined as a macro, you can use the following statements to call it:&CALL SETC ’MAC1’&CALLYou cannot use a variable symbol as a macro instruction that passes operands tothe macro. The second statement in the following example generates an error:&CALL SETC ’MAC1 OPERAND1=VALUE’&CALLYou must specify operand entries after the variable symbol, as shown in thefollowing example:&CALL SETC ’MAC1’&CALL OPERAND1=VALUEentryUse the operand entry of a macro instruction to pass values into the called macrodefinition. These values can be passed through:v The symbolic parameters you have specified in the macro prototype, orv The system variable symbol &SYSLIST if it is specified in the body of the macrodefinition (see “&SYSLIST System Variable Symbol” on page 273).The two types of operands allowed in a macro instruction are positional andkeyword operands. You can specify a sublist with multiple values in both types ofoperands. Special rules for the various values you can specify in operands are alsogiven below.Positional operandsYou can use a positional operand to pass a value into a macro definition throughthe corresponding positional parameter declared for the definition. You shoulddeclare a positional parameter in a macro definition when you want to change thevalue passed at every call to that macro definition.You can also use a positional operand to pass a value to the system variablesymbol &SYSLIST. If &SYSLIST, with the applicable subscripts, is specified in amacro definition, you do not need to declare positional parameters in theprototype statement of the macro definition. You can thus use &SYSLIST to refer toany positional operand. This allows you to vary the number of operands youspecify each time you call the same macro definition.The positional operands of a macro instruction must be specified in the same orderas the positional parameters declared in the called macro definition.Each positional operand constitutes a character string. This character string is thevalue passed through a positional parameter into a macro definition.The specification for each positional parameter in the prototype statementdefinition must be a valid variable symbol. Values are assigned (see ▌1▐ inFigure 29 on page 299) to the positional operands by the corresponding positionalarguments (see ▌2▐ in Figure 29) specified in the macro instruction that calls themacro definition.298 <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!