COBOL Manual for TNS and TNS/R Programs
Procedure Division Verbs
HP COBOL Manual for TNS and TNS/R Programs—522555-006
9-76
EXIT
EXIT
EXIT provides:
•
A common end point for a series of procedures
•
A marker for the logical end of a called program
•
A way to return to the test in an in-line PERFORM statement
•
A way to go to the end of the last statement in a paragraph or section
PROGRAM
PARAGRAPH
SECTION
PERFORM
CYCLE
are explained in Table 9-2.
Table 9-2. EXIT Statement Restrictions and Effects (page 1 of 2)
Statement Restrictions Effect
EXIT Must appear in a sentence by
itself, and that sentence must
be the only sentence in the
paragraph.
Provides a common end point
for a group of procedures or
indicates the logical end of a
called program. Does not affect
program compilation or
execution.
EXIT PROGRAM If it appears in a consecutive
sequence of imperative
statements within a sentence,
it must be the last statement
in the sequence.
Not allowed while executing a
GLOBAL declarative
procedure, except within a
program that was called while
the declarative procedure was
executing.
Depends on the program that
executes it—see Usage
Considerations:.
EXIT
SECTION
PERFORM
PARAGRAPH
CYCLE
PROGRAM
VST156.vsd