Previous topic |
Next topic |
Contents |
Contact z/OS |
Library |
PDF
AIF instruction HLASM Language Reference SC26-4940-06 |
|
Use the AIF instruction to branch according to the results of a condition test. You can thus alter the sequence in which source program statements or macro definition statements are processed by the assembler. The AIF instruction also provides loop control for conditional assembly processing, which lets you control the sequence of statements to be generated. It also lets you check for error conditions and thus branch to
the appropriate MNOTE instruction to issue an error message.
>>-+-----------------+--AIF-------------------------------------> '-sequence_symbol-' >--(logical_expression)sequence_symbol-------------------------><
In the following example, the assembler branches to the label .OUT if &C = YES:
The sequence symbol in the operand field is a conditional assembly label that represents a statement number during conditional assembly processing. It is the number of the statement that is branched to if the logical expression preceding the sequence symbol is true. The statement identified by the sequence symbol referred to in
the AIF instruction can appear before or after the AIF instruction.
However, the statement must appear within the local scope of the
sequence symbol. Thus, the statement identified by the sequence symbol
must appear:
You cannot branch from open code into a macro definition or between macro definitions, regardless of nested calls to other macro definitions. The following macro definition generates the statements needed
to move a fullword fixed-point number from one storage area to another.
The statements are generated only if the type attribute of both storage
areas is the letter F.
The logical expression in the operand field of Statement 1 has the value true if the type attributes of the two macro instruction operands are not equal. If the type attributes are equal, the expression has the logical value false. Therefore, if the type attributes are not equal, Statement 4 (the statement named by the sequence symbol .END) is the next statement processed by the assembler. If the type attributes are equal, Statement 2 (the next sequential statement) is processed. The logical expression in the operand field of Statement 2 has the value true if the type attribute of the first macro instruction operand is not the letter F. If the type attribute is the letter F, the expression has the logical value false. Therefore, if the type attribute is not the letter F, Statement 4 (the statement named by the sequence symbol .END) is the next statement processed by the assembler. If the type attribute is the letter F, Statement 3 (the next sequential statement) is processed. |
Copyright IBM Corporation 1990, 2014
|