COBOL Manual for TNS and TNS/R Programs
Procedure Division
HP COBOL Manual for TNS and TNS/R Programs—522555-006
8-12
Paragraphs
Usage Considerations:
•
Paragraph Headers Not Restricted to Area A
The HP COBOL compilers accept paragraph headers that do not begin in area A;
the compiler recognizes a statement by its initial verb. When the compiler
recognizes the end of a sentence (by detecting the terminating period) and is
prepared to accept another sentence or a paragraph, it accepts any legal
paragraph header or section header whether it begins in area A or after it.
•
End of a Paragraph
A paragraph ends immediately before the next paragraph header or section
header, at the end of the Procedure Division, or when it is the last paragraph in the
Declaratives Portion of the Procedure Division, at the keywords END
DECLARATIVES.
•
Multiple Paragraph Headers (Null Paragraphs)
A paragraph header can be followed immediately by another paragraph header:
CHECK-THE-INPUT.
GET-THE-FIRST-RECORD.
READ IN-FILE ...
In this case, CHECK-THE-INPUT is a null paragraph, so
GO TO CHECK-THE-INPUT
is equivalent to
GO TO GET-THE-FIRST-RECORD
but PERFORM CHECK-THE-INPUT returns control immediately to the statement
following the PERFORM.
•
Paragraph Form Only for Use With the ALTER Statement
There is a simpler form of the paragraph used in conjunction with an ALTER
statement. For details, see ALTER.