Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Writing an ABEND program for my system

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
pingte

Active User


Joined: 03 Dec 2005
Posts: 120
Location: india

PostPosted: Tue Aug 28, 2007 3:58 pm    Post subject: Writing an ABEND program for my system
Reply with quote

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
View user's profile Send private message

dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Tue Aug 28, 2007 4:09 pm    Post subject:
Reply with quote

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
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2150
Location: At my coffee table

PostPosted: Tue Aug 28, 2007 4:14 pm    Post subject:
Reply with quote

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
View user's profile Send private message
pingte

Active User


Joined: 03 Dec 2005
Posts: 120
Location: india

PostPosted: Tue Aug 28, 2007 4:16 pm    Post subject:
Reply with quote

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
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3158
Location: Tucson AZ

PostPosted: Tue Aug 28, 2007 5:14 pm    Post subject:
Reply with quote

Isn't there an LE module that can abend batch?
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2360
Location: Israel

PostPosted: Tue Aug 28, 2007 6:07 pm    Post subject:
Reply with quote

Indeed, there is an LE Callable service, called CEE3ABD.

O.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Tue Aug 28, 2007 6:07 pm    Post subject:
Reply with quote

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
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Tue Aug 28, 2007 7:30 pm    Post subject:
Reply with quote

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
View user's profile Send private message
pingte

Active User


Joined: 03 Dec 2005
Posts: 120
Location: india

PostPosted: Wed Aug 29, 2007 9:45 am    Post subject:
Reply with quote

Thanks a lot everyone for sharing ur knowledge!
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Wed Aug 29, 2007 12:53 pm    Post subject:
Reply with quote

You're welcome icon_smile.gif

Do you have something running to do what you need?

If you post your solution, others may benefit from it.
Back to top
View user's profile Send private message
pingte

Active User


Joined: 03 Dec 2005
Posts: 120
Location: india

PostPosted: Wed Aug 29, 2007 1:06 pm    Post subject:
Reply with quote

Sure!

I am dynamically calling a non existing module to serve my purpose.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts IMS region inactive - User abend code... gthmrj IMS DB/DC 5 Tue Mar 07, 2017 12:29 pm
No new posts Writing on to GSAM variable length rohanthengal JCL & VSAM 6 Fri Mar 03, 2017 7:46 pm
No new posts Overlay the system date Danielle.Filteau SYNCSORT 4 Fri Mar 03, 2017 1:16 am
No new posts SQL query not working in Cobol program. CuriousMainframer COBOL Programming 14 Wed Feb 22, 2017 5:56 pm
No new posts Executing OO COBOL program invoking J... Virendra Shambharkar COBOL Programming 2 Tue Jan 10, 2017 6:37 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us