Previous topic |
Next topic |
Contents |
Contact z/OS |
Library |
PDF
Leaving a nested DO HLASM Toolkit Feature User's Guide GC26-8710-10 |
|
It is possible to leave a nested DO macro by specifying
a label on the DO macro and the same label as a parameter
on a contained ASMLEAVE macro. Here is the flowchart for this structure:
┌─←─────────────────────────────────────────────←─┐Not Done │ ┌──Loop Body───┐ ↑ ┌──┐ ┌────┐ ↓ ┌─────┐True : : ┌─────┐False┌──┴──┐Done ┌─────┐ │DO├─→│Init├─→┴─→┤WHILE├───→ : some code :─→──│UNTIL├────→┤Count├─→┬─→┤ENDDO│ └──┘ └────┘ │Test │ : : │Test │ │Test │ ↑ └─────┘ └──┬──┘ : ┌──────────┐ : └──┬──┘True └─────┘ │ │ False : │ ASMLEAVE ├───→─┬───┴────────────────→┤ │ : └──────────┘ : └──→ outer ENDDO │ ↓ └──────────────┘ │ └──────────────────────────→─────────────────────→┘ If a label is not specified, then the current macro is exited. In the following example, asmleave loop breaks from the inner
DO loop to the end of the outer (labeled) DO loop, while the asmleave
without a label just breaks to the end of the current DO loop:
produces:
|
Copyright IBM Corporation 1990, 2014
|