Hi all, in HP COBOL II, we use CALL INTRINSIC "QUIT" to abort a Cobol program in such a way as to cause the JCL to abort as well. Is there a standard Cobol statement that will do the same? Thanks, Dan.
As far as I know there is no ANSI equivalent - hey, I could be wrong.
But, various COBOL implementations and platforms have statements of that nature in several different flavors.
At the end, its up to the implementer to specify how the system (or the batch job in your case) is altered depending on which terminating call is made by the program.
Implementation of termination statements usually calls for the runtime to set some OS register with the appropriate value. For example 0 for STOP RUN (good), 1 for "run of the mill" ABEND, 2 for ABEND "with prejudice", etc... Upon program termination, the OS or the batch job JCL would examine the register, and determine what to do with the system state or the batch job stream.
In Rm_Cobol I just make a call to a non existing
external program which shows as documentation if I am logging the run.
Call "name test failed".
Then I know why I aborted.
Enjoy Bob
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.