When might you choose to use a PERFORM UNTIL loop instead of a PERFORM VARYING loop?

  • When the loop condition is based on a fixed number of iterations
  • When the loop condition is based on a logical condition at the end of the loop
  • When the loop condition is based on a specific range of values
  • When the loop condition is not predetermined
A PERFORM UNTIL loop in COBOL is used when the loop condition is based on a logical condition at the end of the loop. It ensures that the loop continues until a specified condition is met, providing flexibility in defining the termination criteria.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *