COBOL Manual for TNS and TNS/R Programs

Procedure Division Verbs
HP COBOL Manual for TNS and TNS/R Programs522555-006
9-32
CANCEL
CANCEL
CANCEL signals that you are done with a program that you called. On some computer
systems, CANCEL releases memory used by a program that is no longer needed. On
NonStop systems, CANCEL restores each specified program to its initial state (see
Initial State). Nothing happens if a CANCEL statement specifies an initial program, a
program that was not called, or a program that has already been cancelled.
program-name
is a nonnumeric literal whose value is the program-name in the PROGRAM-ID
paragraph of the COBOL program to be cancelled.
file-mnemonic
specifies the object file containing the program to be canceled. Associate file-
mnemonic with the operating system file name in the SPECIAL-NAMES
paragraph of the Environment Division (see SPECIAL-NAMES Paragraph).
identifier
is an alphanumeric, nonnational data item whose value (which is not known until
run time) is the program-name in the PROGRAM-ID paragraph of the COBOL
program to be cancelled.
Usage Considerations:
Internal Data Items Resume Their Initial Values
Each internal data item (except those in the Linkage Section) is reset to the value
that it had the first time the program was called. (CANCEL does not affect external
data items.)
Internal File Connectors Are Implicitly Closed
Each internal file connector whose open mode is neither closed nor locked is
implicitly closed. The implicit close operation proceeds as if a CLOSE statement
with no optional phrases were executed for each of the internal files. (CANCEL
does not affect external file connectors.)
CANCEL
identifier
program-name
OF
IN
file-mnemonic
VST136.vsd