COBOL Manual for TNS/E Programs (H06.08+, J06.03+)
Usage Considerations:
• Section Format
Beginning
After the period separator that precedes the first paragraph of a section, do not put
anything on the same text line except space characters or a USE statement.
◦
◦ End
A section ends at the next section header, at the physical end of the Procedure Division,
or at the keywords END DECLARATIVES.
• Standard COBOL Format
To conform to the COBOL standard, observe these rules. (HP COBOL compilers do not require
that you follow these rules.)
◦ If you use sections, put all paragraphs in sections
If the Procedure Division contains sections, put every paragraph in a section. (This means
that if the Procedure Division contains a Declaratives Portion, which always contains at
least one section, then each paragraph in the Procedure Division must be in a section.)
◦ Start each section on a separate line and follow section header immediately by paragraph
header
Start each section on a separate line, with the section-name beginning in area A and
nothing but space characters preceding it.
• Independent Segments
An independent segment is a section whose segment-number is greater than 49. Independent
segments are relevant only to the ALTER statement, which you are advised not to use because
the 1985 COBOL standard classifies it as an obsolete element. (Use a MOVE statement and
a conditional GO TO statement instead.)
Procedures
A procedure is a paragraph, a group of successive paragraphs, a section, or a group of successive
sections executed as a unit under the control of a PERFORM statement.
paragraph
is described in Paragraphs.
section
is described in Sections.
There is a distinct difference between procedure-name and procedure. A procedure-name refers
to a paragraph or section in the source program. A procedure-name is either a section-name or a
paragraph-name (which can be qualified by a section-name). A procedure is a paragraph, a group
of successive paragraphs, a section, or a group of successive sections to be executed as a unit.
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
Procedure Division Components and Syntax 237










