IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

How to capture the system abends like SOC1, SOC4.


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
er_ani

New User


Joined: 04 May 2007
Posts: 3
Location: India

PostPosted: Wed Jun 27, 2007 11:20 am
Reply with quote

How to capture the system abends or any unexpected error in cobol program.
Back to top
View user's profile Send private message
murmohk1

Senior Member


Joined: 29 Jun 2006
Posts: 1436
Location: Bangalore,India

PostPosted: Wed Jun 27, 2007 2:05 pm
Reply with quote

er_ani,

Quote:
How to capture the system abends or any unexpected error in cobol program.


You mean to say abend handling.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


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

PostPosted: Wed Jun 27, 2007 2:10 pm
Reply with quote

Hello,

Unless you find and license some kind of strange/special product, i don't believe you'll be able to "capture" these abends. Usually when these kinds of abends occur, there is no way to continue - the environment for that particular execution is no longer stable.

These abends are raised when the application tries to do something that is not do-able, like execute an assembler iinstruction that does not exist (0c1) or move data to an invalid memory address (0c4).

The way to "capture" abends is to write code in such a way that abend conditions are not raised.

If you could "capture" an 0c4 (for example) what would you do next?
Back to top
View user's profile Send private message
er_ani

New User


Joined: 04 May 2007
Posts: 3
Location: India

PostPosted: Wed Jun 27, 2007 4:33 pm
Reply with quote

Hi Dick, some files are dynamically created in the programs. The filename will differ each time as it has a runsequence and data as the qualifiers. These files have to be deleted either the program abend or successful. If the programs goes successfully or if it abend with user abend then it calls the abend routine where these dynamically created files get deleted. But if the program abend with system error(mostly we get SOC1 because of space problem) then it should call the abend routine to delete these files.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


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

PostPosted: Wed Jun 27, 2007 6:24 pm
Reply with quote

Hello,

I don't understand how a space problem causes an 0c1. How does this occur?

Depending on how your process creates these files, you could possibly run a step after the problem step (COND=EVEN) that would delete the necessary files. If the process knows which files to create, the follow-on step can know which to delete.

Again, my focus would be preventing the system abend, not dealing with it.
Back to top
View user's profile Send private message
murmohk1

Senior Member


Joined: 29 Jun 2006
Posts: 1436
Location: Bangalore,India

PostPosted: Wed Jun 27, 2007 6:43 pm
Reply with quote

Quote:
If the programs goes successfully or if it abend with user abend then it calls the abend routine where these dynamically created files get deleted. But if the program abend with system error(mostly we get SOC1 because of space problem) then it should call the abend routine to delete these files.


Is it manadtory to call abend routine to delete these files? Can't it be done through disp parameter directly?
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


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

PostPosted: Wed Jun 27, 2007 7:03 pm
Reply with quote

Hello,

Probably not as they are created after the jcl is already running. . .
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts Sysplex System won't IPL at DR site I... All Other Mainframe Topics 2
No new posts How to delete a user's alias from the... JCL & VSAM 11
No new posts Insert system time/date (timestamp) u... DFSORT/ICETOOL 5
No new posts JCL Dynamic System Symbols JCL & VSAM 3
No new posts Rexx to capture output from TSO HSEND... CLIST & REXX 9
Search our Forums:

Back to Top