COBOL - Canceling a subprogram



Desenvolvido por DORNELLES Carlos Alberto - Analista de Sistemas - Brasília DF. - cad_cobol@hotmail.com

COBOL - Structuring complex applications - Canceling a subprogram

Enterprise COBOL for z/OS, Version 4.2, Programming Guide


When you issue a CANCEL statement for a subprogram, the storage that is occupied by the subprogram is freed.
A subsequent call to the subprogram functions as though it were the first call.
You can cancel a subprogram from a program other than the original caller.

If the called subprogram has more than one entry point, ensure that an intervening CANCEL statement is issued before you specify different entry points in a dynamic CALL statement to that subprogram.

After a CANCEL statement is processed for a dynamically called contained program, the program will be in its first-used state.
However, the program is not loaded with the initial call, and storage is not freed after the program is canceled.

Related concepts


© Copyright IBM Corp.