Multiple choice technology mainframe

If someone wanted a COBOL perform "loop" to execute once before the condition is checked, which of the following would they do?

  1. use a standard perform statement

  2. use an in line perform

  3. skillful use of the COBOL reserved word "AFTER"

  4. This is not possible in COBOL

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

In COBOL, specifying PERFORM WITH TEST AFTER guarantees the loop body executes at least once before testing the loop condition, acting as a post-test loop. Standard or inline PERFORM statements default to checking the condition first (TEST BEFORE), while the AFTER option is the precise mechanism to alter this evaluation timing.