View previous topic :: View next topic
|
Author |
Message |
pingte
Active User
Joined: 03 Dec 2005 Posts: 120 Location: india
|
|
|
|
Hi,
I am trying to write a ABEND program for my system.
(i.e. a program which can be used to forcefully abend)
Can anyone provide me with a sample code ... or least how to go about it? |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
IBM has modules that you can CALL to force an ABEND. But, why?
The program that forces the ABEND (your new pgm) is the primary program in the dump. What use is that?
If you can code all your application programs to CALL your new ABEND program, you can code all your application programs to display or dump relevant data to aid in debugging, and exit with a return code > zero that can be recognized by a scheduler.
In other words, to come down in an orderly fashion.
To force the ops-sys to go thru an ABEND process is unnecessary, wasteful, thoughtless, pointless, costly and just dumb. It takes a ton of cycles for the ops-sys to handle and ABEND.
but, if you just gotta. The tried and proven method is to preload a comp-3 field (either by redef or a Reference Modification move) with spaces and add 1. |
|
Back to top |
|
|
CICS Guy
Senior Member
Joined: 18 Jul 2007 Posts: 2146 Location: At my coffee table
|
|
|
|
If your shop does not already have a standard routine to call for that purpose, you could set a high return code and let your schedular catch the error and flush the rest of the job.
Alternately, a dynamic call to a non-existent module will work too..... |
|
Back to top |
|
|
pingte
Active User
Joined: 03 Dec 2005 Posts: 120 Location: india
|
|
|
|
thanks for the info!
Quote: |
If you can code all your application programs to CALL your new ABEND program, you can code all your application programs to display or dump relevant data to aid in debugging, and exit with a return code > zero that can be recognized by a scheduler.
|
Can you please let me know how to achieve that.. i.e how to code application program to display or dump relevant data...
Also for my information .. can you please let me know what are the IBM modules that can be called to force a abend? |
|
Back to top |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
Isn't there an LE module that can abend batch? |
|
Back to top |
|
|
ofer71
Global Moderator
Joined: 27 Dec 2005 Posts: 2358 Location: Israel
|
|
|
|
Indeed, there is an LE Callable service, called CEE3ABD.
O. |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
GA22-7560-03 Lang Env Debugging Guide and a quote from the the Application Programming on z/OS Guide (attachment):
Quote: |
errors and handling bad input. Your application should be designed to:- Validate input before using it
- Issue detailed error messages to simplify debugging
- Consider adding diagnostic tracing to the application which can be turned on and off
- Where possible, terminate a single transaction without taking down the entire server
|
Even if your environment is OS390, LE exists. Go to the IBM Library Server Library and search for SA22-756 Books, pick the ones for your OS. There are routines for dumps, (the debugging guide, above, explains how to read a dump), and task termination requests that return a user-requested return code for the system. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
To force a user abend, you might try:
Code: |
77 COMP-CODE PIC S9999 COMP.
.
.
.
MOVE uuuu TO COMP-CODE.
CALL "ILBOABN0" USING COMP-CODE. |
|
|
Back to top |
|
|
pingte
Active User
Joined: 03 Dec 2005 Posts: 120 Location: india
|
|
|
|
Thanks a lot everyone for sharing ur knowledge! |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
You're welcome
Do you have something running to do what you need?
If you post your solution, others may benefit from it. |
|
Back to top |
|
|
pingte
Active User
Joined: 03 Dec 2005 Posts: 120 Location: india
|
|
|
|
Sure!
I am dynamically calling a non existing module to serve my purpose. |
|
Back to top |
|
|
|