HP 3000 Manuals

CANCEL Statement [ HP COBOL II/XL Reference Manual ] MPE/iX 5.0 Documentation


HP COBOL II/XL Reference Manual

CANCEL Statement 

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

Syntax 

[]
Parameters identifier-1 defined as an alphanumeric data item whose contents name a subprogram compiled by the HP COBOL II compiler. literal-1 nonnumeric literal that names a COBOL subprogram compiled by the HP COBOL II compiler. Description When a CANCEL statement is issued for a COBOL program, the program specified in the statement must have already executed a GOBACK or EXIT PROGRAM statement. For both dynamic and non-dynamic subprograms in HP COBOL II, the CANCEL statement has no effect. This occurs because automatic release of the memory areas accompanies the exiting of the dynamic subprogram. For non-dynamic subprograms, the data area is permanently assigned and the code segments are automatically released. For ANSISUB subprograms, a CALL statement that is executed after a CANCEL statement naming the same program causes that program to be brought into memory in its initial state. Refer to Appendix B for details of the ANSISUB parameter. If a CANCEL statement specifies a program that has not been called, or has been called but is presently canceled, the CANCEL statement is ignored and control passes to the next executable statement. The CANCEL statement causes an implicit CLOSE statement to be executed for every open file associated with the program being canceled. No USE procedures are executed.


MPE/iX 5.0 Documentation