CEEMRCR and COBOL

When you make a call to CEEMRCR to move the resume cursor, or issue a call to longjmp(), and a COBOL program is removed from the stack, the COBOL program can be re-entered via another call path. (This will not work for VS COBOL II programs.)

If the COBOL program does not specify RECURSIVE in the PROGRAM-ID, a recursion error is raised if you attempt to enter the routine again.
  • A VS COBOL II, COBOL/370, COBOL for MVS & VM, or COBOL for OS/390 & VM program compiled with the CMPR2 option
  • A VS COBOL II program compiled with the NOCMPR2 option (which does not use nested routines)
  • A COBOL/370, COBOL for MVS & VM, or COBOL for OS/390 & VM program compiled with the NOCMPR2 option that does not use the combination of the INITIAL attribute, nested routines, and file processing in the same compilation unit.
  • An Enterprise COBOL for z/OS program that does not use the combination of the INITIAL attribute, nested routines, and file processing in the same compilation unit.

In addition, if the routine is a COBOL routine with the INITIAL attribute and containing files, the files are closed. (COBOL supports VSAM and QSAM files and these files are closed.)