PURPOSE: The EXIT statement causes ACCENT R to stop executing statements and exit the section, loop, Process Module (PM), or routine it is currently executing. A conditional clause can be included if subsequent statements should not be executed based on a given condition. This provides you with an unstructured termination and is not recommend except in extreme situations.
EXIT {SECTION; PROCESS; ROUTINE} [IF; UNLESS clause]
EXIT SECTION |
passes control immediately to the next logical section. If it were in the total section, for instance, it stops execution of the section and next executes the detail section. |
EXIT PROCESS |
causes the current PM to be exited. If operating from within a Command Module (CM) or System File (SF), it passes control to the next statement. If not, it returns control to the command level. |
EXIT ROUTINE |
passes control to the statement that follows the calling PERFORM statement. Not recommended if following good structured programming standards. |
EXIT PROCESS IF QTY:M = 0
NOTES: The EXIT statement must be within the section, routine, or PM to which it applies. For example, EXIT SECTION and EXIT PROCESS cannot be used in a routine.