HLASM Toolkit Feature User's Guide
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Toolkit Feature structured programming macros

HLASM Toolkit Feature User's Guide
GC26-8710-10

The HLASM Toolkit Feature structured programming macros simplify the coding and understanding of complex control flows, and help to minimize the likelihood of introducing errors when coding test and branch instructions. For details on the structured programming macros see Using structured programming macros.

These macros support the most widely used structured-programming control structures and eliminate the need to code most explicit branches.

You can use the Toolkit Feature structured programming macros to create the following structures:
IF/ELSE/ENDIF
One-way or two-way branching, depending on simple or complex test conditions.
DO/ENDDO and STRTSRCH/ORELSE/ENDLOOP/ENDSRCH
A rich and flexible set of looping structures with a variety of control and exit facilities.
CASENTRY/CASE/ENDCASE
Fast N-way branching, based on an integer value in a register. Deciding which branch to take is made at the CASENTRY macro; a direct branch to the selected CASE is then done, followed by an exit at the ENDCASE macro.

There is no OTHRWISE facility within this macro set.

SELECT/WHEN/OTHRWISE/ENDSEL
Sequential testing, based on sets of comparisons. These macros create a series of tests that are evaluated in the order they are specified in the program. If a test is true, the WHEN section of code for that test is executed, followed by an exit at the ENDSEL macro.

If no test is satisfied, then the OTHRWISE section (if present) is performed.

All the macro sets may be nested, and there are no internal limits to the depth of nesting. Tests made by the various ENDxxx macros ensure that each structure's nesting closure is at the correct level, and diagnostic messages (MNOTEs) are issued if they are not.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014