Application Delivery Management
Application Modernization & Connectivity
CyberRes
IT Operations Management
We have a mixed language system, C main program and COBOL sub programs.
runner.c -–(cobcall)--> a.cbl --(call)--> jump.c --(cobcall)--> b.cbl
After exiting subroutine b by using longjmp (going back to jump.c), we are trying (in a.cbl) to do a CANCEL “b”. This does not work:
Load error : file 'b', 177 Attempt to cancel active program
Obviously, there is an active flag or active counter, which gets not reset or decremented by longjmp. A CALL “b” thus stops with:
Execution error : file 'b', 166 Recursive COBOL CALL is illegal
Does anybody know, how to reset the active state of an active subroutine?
Why are we not using coblongjmp, which will safely eliminate this problem? We would happily do, but starting with Visual Cobol 5, Micro Focus has changed the behavior of coblongjmp so that it will refuse to work in some situations. Unfortunately, we are in one of these situations.
Marcus