COBOL Manual for TNS and TNS/R Programs

Program Compilation
HP COBOL Manual for TNS and TNS/R Programs522555-006
11-72
ENDUNIT
ENDUNIT
ENDUNIT signals the end of a program unit. Each independent HP COBOL program
must end with either an ENDUNIT directive or an END PROGRAM statement;
otherwise, programs appear to be nested but lacking their required END PROGRAM
statement.
ENV
COMMON
LIBRARY
OLD
See Table 11-20.
Default: The compiler detects the end of a Procedure Division by encountering
either an END PROGRAM statement or the end of the file.
Placement: Must be either on a directive line of its own or be the last of a sequence
of directives.
Scope: Applies to program unit
Dependencies: None
Note. This directive is useful only for the COBOL85 compiler. The NMCOBOL compiler
accepts this directive with the COMMON option (the default for this compiler), reports an error
for the OLD option, and issues a warning for the LIBRARY option.
Default: ENV OLD
Placement: Must appear before any source code lines
Scope: Applies to all programs in its source file
Dependencies: None
ENDUNIT
VST279.vsd
COMMON
LIBRARY
OLD
ENV
VST280.vsd