COBOL Manual for TNS and TNS/R Programs
HP COBOL Manual for TNS and TNS/R Programs—522555-006
8-1
8 Procedure Division
The Procedure Division is optional, but a program without a Procedure Division does
nothing except initialize data.
The Procedure Division is composed of statements, which specify the actions to be
taken by the program. The program does its work by executing the statements in their
appropriate sequence. The way you organize the statements not only governs the
order in which they execute but also can contribute to your program’s readability and
maintainability.
You can organize statements into sentences, sentences into paragraphs, and
sentences and/or paragraphs into sections. A paragraph, a group of successive
paragraphs, a section, or a group of successive sections can be executed as a unit
called a procedure.
The Procedure Division can optionally include a Declaratives Portion. The Declaratives
Portion is a set of sections at the beginning of the Procedure Division. These sections
are executed if specified conditions arise during the execution of statements outside
the Declaratives Portion.
Figure 8-1. Relationship of Statements, Sentences, Paragraphs, and Sections
section(s)
paragraph(s)
sentence(s)
statement(s)
procedure(s)
VST508.vsd