Assembler programs that load and delete COBOL programs

Under Language Environment®, assembler programs can SVC load and SVC delete load modules that contain any of the following programs:
  • VS COBOL II programs compiled with the NORENT option
  • IBM® COBOL programs compiled with the NORENT option
Restriction: Language Environment cannot keep track of SVC delete, which can free storage, control areas, and file I/O areas associating with the program. Any files not closed by the program, or storage allocated for it, will not be freed properly by the Language Environment or the COBOL library. Subsequent access to these resources may lead to unpredictable results. In addition, Debug Tool does not support COBOL programs that are in load modules that are deleted by assembler using SVC delete.
Under Language Environment, assembler programs can SVC load but cannot SVC delete load modules that contain any of the following programs:
  • VS COBOL II programs compiled with the RENT option
  • IBM COBOL programs compiled with the RENT option
  • Enterprise COBOL programs

If assembler programs SVC delete load modules that contain these kinds of programs, unpredictable results can occur.

In general, for assembler programs that need to load and delete load modules that contain a COBOL program, the recommended method is one of the following. This applies to COBOL programs with RENT or NORENT options.
  • Have the assembler program statically call a COBOL program that performs the dynamic call and performs the CANCEL.
  • Use the Language Environment-provided CEEFETCH and CEERELES macros.

Assembler programs must use CEEFETCH instead of CEELOAD to load COBOL 5 or 6 programs, because COBOL 5 and 6 programs are program objects.