Previous topic |
Next topic |
Contents |
Contact z/OS |
Library |
PDF
The SELECT macro set HLASM Toolkit Feature User's Guide GC26-8710-10 |
|
The SELECT macro set selects one of a set of functions for execution,
depending on the result of a comparison. The flowchart for the SELECT
program figure is:
┌──────┐ ┌────────┐ True ┌────┐ ──────→┤SELECT├────→┤WHEN (1)├──────→┤ F1 ├──→──────────┐ └──────┘ └───┬────┘ └────┘ │ │ ↓ │ False │ ↓ │ ┌───┴────┐ True ┌────┐ │ │WHEN (2)├──────→┤ F2 ├──→──────────┤ └───┬────┘ └────┘ │ │ False ↓ ↓ │ ┌───┴────┐ True ┌────┐ │ │WHEN (3)├──────→┤ F3 ├──→──────────┤ └───┬────┘ └────┘ │ │ False ↓ │ │ . . . . ↓ . ┌───┴────┐ True ┌────┐ │WHEN (n)├──────→┤ Fn ├──→──────────┤ └───┬────┘ └────┘ │ │ False │ ↓ ↓ ┌────┴────┐ ┌─────┐ ┌───┴──┐ │ OTHRWISE├──────→┤Code ├───────→┤ENDSEL├─→ └─────────┘ └─────┘ └──────┘ OTHRWISE is optional. This example uses the SELECT, WHEN, OTHRWISE, and ENDSEL macros:
It produces:
Here is another example of the SELECT Macro Set:
It produces:
The SELECT group allows a SELECT with no operands followed by WHEN macros with IF style operands. This produces the same structure as the IF/ELSEIF/ELSE/ENDIF macros. For example: :
produces (assuming that ASMMREL ON has
been coded earlier):
|
Copyright IBM Corporation 1990, 2014
|