Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

What is CONTINUE?

NEXT SENTENCE vs CONTINUE

What is CONTINUE?

by  k5tm  Posted    (Edited  )
CONTINUE is a real COBOL statement that has no effect upon the execution of the program.

CONTINUE is most useful within a conditional phrase of another statement when no action is desired when the condition occurs (that is, correct COBOL syntax requires a statement even though the programmer wants nothing done).
Code:
READ MASTER-FILE
  AT END
    IF TOTAL-RECORD-COUNT > 0 
        CONTINUE
    ELSE
        PERFORM PROCESS-EMPTY-FILE
    END-IF
    SET MASTER-AT-END TO TRUE
  NOT AT END
    ADD 1 TO TOTAL-RECORD-COUNT
END-READ
Register to rate this FAQ  : BAD 1 2 3 4 5 6 7 8 9 10 GOOD
Please Note: 1 is Bad, 10 is Good :-)

Part and Inventory Search

Back
Top