Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Abort cobol program using standard cobol

Status
Not open for further replies.

Dan01

Programmer
Jun 14, 2001
439
0
0
US
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.
 
On an OS390, you can call ILBOABN0 which is an IBM supplied abend routine, usually in the link edit step, which will do the same thing.

Where I work at the moment, the load module can be found on the library SYS1.SCEELKED which I think is an standard IBM library.

Marc
 
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"[dazed], 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.

Dimandja
 
OK, thanks guys. Appreciate the responses. Dan.
 
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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top