COBOL Manual for TNS and TNS/R Programs
Procedure Division Verbs
HP COBOL Manual for TNS and TNS/R Programs—522555-006
9-165
PERFORM UNTIL
proc-2
identifies the last procedure in the group.
test-site
specifies whether the condition is to be tested before or after the PERFORM range
is executed. The default is TEST BEFORE.
condition
is any conditional expression.
imperative-statement
is defined in Imperative Statement.
END-PERFORM
ends the scope of the PERFORM statement, causing the PERFORM to be a
delimited-scope statement. If the PERFORM statement does not end with an
END-PERFORM phrase, it is an out-of-line PERFORM. If the PERFORM
statement ends with an END-PERFORM phrase, it is an in-line PERFORM.
Usage Considerations:
•
No Execution With TEST BEFORE if the Condition Value is TRUE
If the TEST AFTER phrase is not present and the value of the condition is TRUE
when control first arrives at the PERFORM statement, the PERFORM range is not
executed.
•
See Usage Considerations: in Unconditional PERFORM.
The PERFORM UNTIL statement in Example 9-54 uses a condition-name condition.
Once the add routine is successful, a SET ANY-ADDS-CV TO TRUE statement is
executing (moving the value 1 to ANY-ADDS-CV); otherwise, ANY-ADDS-CV remains
0 when control returns to the PERFORM statement. As long as ANY-ADDS-CV is 0,
the PERFORM cycle is re-executed.
WITH
TEST BEFORE
AFTER
VST197.vsd