Operating System - OpenVMS

Re: COBOL Objects with IO statements, wrapped by WSIT

Go to solution
Hein van den Heuvel
Honored Contributor

Re: COBOL Objects with IO statements, wrapped by WSIT

Maurizio, Those rules 1 & 2 I posted earlier were direct quotes from the manual.
This is how it is, and how it is intended to be, so it is how it stays. This may still be relevant for your problem.
I do not have much handson experience with this, I just know several
folks were surprised by this behaviour over time.
$ help cobol proc exit
$ help cobol proc stop

I guess I would make sure to put some printout and/or lib$signal and/or sys$exit calls between a suspect 'exit program' and the next paragraph.

Hmmm, which reminds me, did you try with a compile /STANDARD=V3?

From an old (1997) note:

V2.4-919 A problem has been corrected which involved the use of the
EXIT PROGRAM statement in a local USE procedure of a COBOL main
program which was compiled with the qualifier /STANDARD=V3.
The problem was that such an EXIT PROGRAM statement did not cause the
execution of the run-unit to terminate immediately, as it does in VAX
COBOL. Instead, the EXIT PROGRAM statement was causing the execution
of the run-unit to continue by returning immediately to the main-line
code of the main program.

Good luck!