COBOL Manual for TNS/E Programs (H06.03+)

Procedure Division Verbs
HP COBOL Manual for TNS/E Programs520347-003
9-75
Delimited-Scope Form
Delimited-Scope Form
condition
is any conditional expression (see Conditional Expressions).
statement-1
is an imperative or conditional statement to be executed if the value of condition
is TRUE. It can contain other IF statements.
ELSE
ends statement-1.
statement-2
is an imperative or conditional statement to be executed if the value of condition
is FALSE. It can contain other IF statements.
END-IF
ends the scope of the IF statement, making it a delimited-scope statement. Without
END-IF, the IF statement is a conditional statement that ends at the next period
separator.
Usage Considerations:
Delimited-Scope Statements Are Recommended Over Conditional Statements
For clarity and convenience, delimited-scope statements are recommended over
conditional statements.
Period Separator in Delimited-Scope IF Statement
A delimited-scope IF statement does not require a period separator. If a period
separator occurs within a delimited-scope IF statement, it terminates the statement
and the compiler diagnoses the END-IF as unmatched.
ELSE statement-2
END-IF
IF
THEN
condition statement-1
VST160.vsd