Prepare Interview

Mock Exams

Make Homepage

Bookmark this page

Subscribe Email Address

Question: Explain the concept of the PERFORM VARYING statement.
Answer: The PERFORM VARYING statement in COBOL is used for iterative processing. It allows a specified set of statements to be repeated while incrementing or decrementing a loop variable.

Example:

PERFORM VARYING I FROM 1 BY 1 UNTIL I > 10
  DISPLAY 'Iteration ' I.
END-PERFORM.
Is it helpful? Yes No

Most helpful rated by users:

©2025 WithoutBook