The *QUIT built-in function specifies an exit from an action diagram sequence construct or user point; when you specify the *QUIT function, all subsequent steps in the construct (or subroutine) are bypassed.
When you specify the *QUIT function within a sequential construct, CA 2E defines a branch to the end of the subroutine.
If you use the *QUIT function outside of a sequential construct, CA 2E defines a branch to the closest, most recently nested, subroutine which, in many instances, is the user point. To limit the action of *QUIT, you can enclose actions within a sequential construct.
There are no parameters for this built-in function.
CA 2E implements the *QUIT built-in function as a GOTO statement for both RPG and COBOL.
Example
In the following example, the step Update database is not executed if errors occur:
.-- : ..Validate fields : ..Validate relations : .-CASE : |-If errors : | <--QUIT : ‘-ENDCASE : ..Update database ‘--
| Copyright © 2011 CA. All rights reserved. | Tell Technical Publications how we can improve this information |