Format 3 (PERFORM with UNTIL) ->->---PERFORM-*-procedure-name-1-------------------------->1 + + + *-phrase-1 imperative-statement------------->2 1->----*----------------------------*-phrase-1--*---------><- *-THROUGH-*-procedure-name-2-* + *-THRU----* + + 2->----END-PERFORM------------------------------* where phrase-1 is: ->->----*------------------------*--UNTIL condition-1---><- *-*------*-TEST-*-BEFORE-* *-WITH-* *-AFTER--*
Condition-1 may be any type of condition (simple, complex, class...). If the condition is true when the PERFORM statement is initiated, the specified procedures are not executed.
Any subscripting associated with the operands specified in condition-1 is evaluated each time the condition is tested.
If the TEST BEFORE phrase is specified or assumed, the condition is tested before any statements are executed (corresponds to DO WHILE).
If the condition is true, control is transferred to the next executable statement following the end of the PERFORM statement. If you do not specify the TEST BEFORE or the TEST AFTER phrase, the TEST BEFORE phrase is assumed.
If the TEST AFTER phrase is specified, the statements to be performed are executed at least once before the condition is tested (corresponds to DO UNTIL).
If the condition is true, control is transferred to the next executable statement following the end of the PERFORM statement. If you do not specify the TEST BEFORE or the TEST AFTER phrase, the TEST BEFORE phrase is assumed.
(C) Copyright IBM Corporation 1992, 2006. All Rights Reserved.