statement and CANCEL in COBOL examples and references are provided.

>CANCEL Statement in COBOL
You use the CANCEL statement in COBOL to cancel a subprogram. The subprogram must be in the same activation group as the program that is canceling it in order for the COBOL CANCEL statement to work.

The COBOL CANCEL statement ensures that the next time the referenced subprogram is called, it will be entered in its initial state. A COBOL CANCEL statement (1) Closes all open files, (2) Operates only on the program specified, and not on any program that may have been called by the canceled program.

The COBOL CANCEL statement restores a program to its initial state and closes all files currently in open mode.

The COBOL CANCEL verb returns the named program to its initial state.

>Diagram of COBOL CANCEL Syntax
Provides a diagram of the COBOL CANCEL syntax


This website uses cookies to manage authentication, navigation, and other functions. By using our website, you agree that we can place these types of cookies on your device.

View e-Privacy Directive Documents

You have declined cookies. This decision can be reversed.

You have allowed cookies to be placed on your computer. This decision can be reversed.


Member Login