COBOL Manual for TNS and TNS/R Programs
Procedure Division
HP COBOL Manual for TNS and TNS/R Programs—522555-006
8-10
Sentences
•
When a delimited-scope statement is contained within another delimited-scope
statement with the same verb, each explicit scope terminator terminates the
statement begun by the most recently preceding, and as yet unpaired, occurrence
of that verb. In this example, the first END-IF ends the second IF statement:
IF A NOT > B
PERFORM PHASE-1
IF A = B
PERFORM PHASE-1X
ELSE
PERFORM PHASE-1Y
END-IF
PERFORM PHASE-2
ELSE
PERFORM PHASE-5
END-IF
Sentences
A sentence is one or more statements terminated by a period separator.
statement
is described in Statements.
A sentence that contains a compiler-directing statement cannot contain any other
statements. When the compiler acts upon the COPY statement, that statement and its
terminating period are logically replaced by whatever text the statement specified. The
COPY sentence can therefore appear to be within another sentence, but once the
compiler acts upon the COPY statement, the COPY sentence itself is replaced by text
from a COPY library and the period separator has disappeared.
When you use the delimited-scope statements of COBOL, you can write an entire
paragraph with only one required period—the one at the end of the paragraph.
statement
.
VST114.vsd