COBOL Manual for TNS/E Programs (H06.08+, J06.03+)
this set of be obvious; that is, the set of paragraphs executed by a PERFORM statement is determined
by control flow, not solely by the order of the paragraphs in the source file.
Declaratives Portion
The optional Declaratives Portion is one or more sections at the beginning of the Procedure Division,
bracketed by the keyword DECLARATIVES and the keywords END DECLARATIVES, that are executed
individually when certain conditions arise during execution of statements in the rest of the Procedure
Division.
The Declaratives Portion is reserved for debugging routines and input-output error routines specified
by USE statements. When used, this area must be coded immediately after the Procedure Division
heading.
section-name, segment-number
are described in Sections.
use-sentence
is a sentence containing only a USE statement.
paragraph
is described in Paragraphs.
section
is described in Sections.
Example 64 Procedure Division with a Declaratives Portion
PROCEDURE DIVISION.
DECLARATIVES.
IN-FILES-USE SECTION.
USE AFTER STANDARD ERROR PROCEDURE ON IN-FILE.
IN-FILES-PARA.
...
END DECLARATIVES.
BEGIN-MY-PROGRAM SECTION.
...
Execution of the Procedure Division
Execution of a run unit begins with the first procedure (that is, section or paragraph) of the Procedure
Division, excluding any declarative sections. Except where specific rules indicate otherwise, sections
are executed in the order in which they appear within the source program. Similarly, paragraphs
are executed in the order in which they appear within their sections, sentences are executed in
238 Procedure Division










