Natural for Mainframes Version 8.2.5 for Mainframes
 —  Programming Guide  —

End of Statement, Program or Application

This document covers the following topics:


End of Statement

To explicitly mark the end of a statement, you can place a semicolon (;) between the statement and the next statement. This can be used to make the program structure clearer, but is not required.

Top of page

End of Program

The END statement is used to mark the end of a Natural program, subprogram, external subroutine or helproutine.

Every one of these objects must contain an END statement as the last statement.

Every object may contain only one END statement.

Top of page

End of Application

Ending the Execution of an Application by a STOP Statement

The STOP statement is used to terminate the execution of a Natural application. A STOP statement executed anywhere within an application immediately stops the execution of the entire application.

Ending the Execution of an Application by a TERMINATE Statement

The TERMINATE statement stops the execution of the Natural application and also ends the Natural session.

Top of page