COBOL Manual for TNS and TNS/R Programs

Procedure Division Verbs
HP COBOL Manual for TNS and TNS/R Programs522555-006
9-88
Conditional Form
Example 9-27 and Example 9-28 are equivalent.
Figure 9-6. How the Conditional IF Statement Works
Exit
Enter
condition
?
Control
passes to
next sentence
FALSE
TRUE
THEN NEXT
SENTENCE
?
FALSE
TRUE
Execute
statement-1
ELSE
phrase
?
FALSE
ELSE NEXT
SENTENCE
?
Execute
statement-2
Control
returns to point
immediately after
last
statement-1
?
TRUE
Control
returns to point
immediately after
last
statement-2
?
FALSE
FALSE
Control is
wherever last
statement-2
transferred it
Control is
wherever last
statement-1
transferred it
TRUE
TRUE
FALSE
TRUE
VST531.vsd