Version 4.2.6 for Mainframes (Update)
 —  Statements  —

END

END

.

This document covers the following topics:

For an explanation of the symbols used in the syntax diagram, see Syntax Symbols.


Function

The END statement is used to mark the physical end of a Natural program. No symbols may follow the END statement.

In reporting mode, any processing loop which is currently active (that is, which has not been closed with a LOOP statement) is closed by the END statement.

Considerations for Program Execution

When an END statement is executed in a main program (that is, a program executing on Level 1), final end-page processing is performed as well as final break processing for user-initiated breaks (PERFORM BREAK PROCESSING) which have not been associated with a processing loop by specifying a reference notation (r).

When an END statement is executed in a subprogram, or in a program invoked with FETCH RETURN, control will be returned to the invoking program without any final processing.

Top of page

Syntax Description

END
Keyword:

The Natural reserved keyword END is normally used to mark the physical end of a Natural program.

.
Period:

Instead of the Natural reserved keyword END, a period (.) may be used. It must be preceded by at least one blank if other statements are contained in the same line.

Top of page

Examples

For some typical examples, see Examples of DEFINE DATA Statement Usage.

Top of page