This article describes how to avoid the CANCEL ALL statement from canceling DLL’s and Shared Library Objects, but still cancel COBOL programs.
It is necessary to cancel everything at this point except DLLs and Shared Object Libraries. For this purpose the CANCEL ALL statement is being used in the code of the program, but it is canceling everything.
The solution is to use the configuration variable CANCEL_ALL_DLLS. The default value for this variable is “1” (on, true, yes). By setting it to “0” (off, false, no) CANCEL ALL will not cancel DLLs or Shared Object Libraries. To cancel a DLL or Shared Object Library a CANCEL statement followed by the name of the library will be needed.