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


Redefining conditional assembly instructions

HLASM Language Reference
SC26-4940-06

A redefinition of a conditional assembly instruction only comes into effect in macro definitions occurring after the OPSYN instruction. The original definition is always used when a macro instruction calls a macro that was defined and edited before the OPSYN instruction.

An OPSYN instruction that redefines the operation code of an assembler or machine instruction generated from a macro instruction is, however, effective immediately, even if the definition of the macro was made prior to the OPSYN instruction. Consider the following example:
          MACRO                        Macro header
          MAC            ...           Macro prototype
          AIF            ...
          MVC            ...
          .
          MEND                         Macro trailer
          .
 AIF      OPSYN          AGO           Assign AGO properties to AIF
 MVC      OPSYN          MVI           Assign MVI properties to MVC
          .
          MAC            ...           Macro call
                                       (AIF interpreted as AIF instruct-
                                       ion; generated AIFs not printed)
+         MVC            ...           Interpreted as MVI instruction
          .
          .                            Open code started at this point
          AIF            ...           Interpreted as AGO instruction
          MVC            ...           Interpreted as MVI instruction

In this example, AIF and MVC instructions are used in a macro definition. AIF is a conditional assembly instruction, and MVC is a machine instruction. OPSYN instructions are used to assign the properties of AGO to AIF and to assign the properties of MVI to MVC. In subsequent calls of the macro MAC, AIF is still defined, and used, as an AIF operation, but the generated MVC is treated as an MVI operation. In open code following the macro call, the operations of both instructions are derived from their new definitions assigned by the OPSYN instructions. If the macro is redefined (by another macro definition), the new definitions of AIF and MVC (that is, AGO and MVI) are used for further generations.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014