COBOL Manual for TNS and TNS/R Programs

Procedure Division
HP COBOL Manual for TNS and TNS/R Programs522555-006
8-4
Statements
Statements
A statement is a syntactically valid combination of words and symbols beginning with a
COBOL verb. Where a statement ends depends on its context.
Table 8-1. Where Statements End
Statement is … Statement ends
in a sequence of statements
and is not the last one
immediately before the verb of the next statement
inside another statement either immediately before the keyword that begins
the next portion of a containing statement or at the
period separator that terminates its containing
sentence
isolated
or the last statement in a sequence
See Scope of Statements
.
Figure 8-2. Statement Examples
Table 8-2. Statement Types
Statement Type Definition
Imperative Specifies an unconditional action for the process to take
Conditional Specifies that the truth value of a condition is to be determined and
that the subsequent action of the run unit depends on this truth value
Delimited-scope Terminates in its explicit scope terminator
Compiler-directing Causes the compiler to take some specific action during compilation
statement
IF SOME-COND MOVE 1 TO X MOVE 2 TO Y MOVE 3 TO Z .
ADD 1 TO A-COUNT ON SIZE ERROR DISPLAY "TILT" STOP RUN END-ADD
CLOSE MY-FILE
statement statement statement
statement
statement
statement
statement
VST509.vsd