What is the difference between the PERFORM...THRU and PERFORM...VARYING statements in COBOL?

  • PERFORM...THRU is used for conditional loops, while PERFORM...VARYING is used for unconditional loops
  • PERFORM...THRU is used for iterative loops, while PERFORM...VARYING is used for nested loops
  • PERFORM...THRU is used for nested loops, while PERFORM...VARYING is used for iterative loops
  • There is no difference between PERFORM...THRU and PERFORM...VARYING
The PERFORM...THRU statement in COBOL is used for nested loops, allowing the programmer to execute a series of paragraphs or sections. On the other hand, PERFORM...VARYING is used for iterative loops, allowing the iteration through a range of values.
Add your answer
Loading...

Leave a comment

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