COBOL/400 Language Help


EXIT Statement

Description
The EXIT statement provides a common end point for a series of paragraphs. It assigns a name to a given point in a program, and has no other effect on the compilation or execution of the program. The EXIT statement must be preceded by a paragraph-name and must appear in a sentence by itself. This sentence does not need to be the only sentence in the paragraph.

The EXIT statement is useful for documenting the end point in a series of paragraphs. If an EXIT paragraph is written as the last paragraph in a declarative procedure or a series of performed procedures, it identifies the point at which control will be transferred:

Without an EXIT statement, the end of the sequence is difficult to determine, unless you know the logic of the program.

->->---EXIT-------------------------------------><-
 


[ Top of Page | Previous Page | Next Page | Table of Contents ]