COBOL Manual for TNS and TNS/R Programs

Procedure Division
HP COBOL Manual for TNS and TNS/R Programs522555-006
8-15
Declaratives Portion
The term procedure can also refer to the set of paragraphs or sections executed under
control of a PERFORM procedure-name or a PERFORM procedure-name
THROUGH procedure-name statement. When the term is used in this dynamic
sense, one procedure can contain or overlap another procedure. The rules of COBOL
do not require that the relationships between members of 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-name
use-sentence
DECLARATIVES
.
DECLARATIVES .
END
SECTION
segment-number
.
paragraph section
VST117.vsd