Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
How to capture the system abends like SOC1, SOC4.

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
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    Post subject: How to capture the system abends like SOC1, SOC4.
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: 1439
Location: Bangalore,India

PostPosted: Wed Jun 27, 2007 2:05 pm    Post subject:
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

Site Director


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

PostPosted: Wed Jun 27, 2007 2:10 pm    Post subject:
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    Post subject:
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

Site Director


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

PostPosted: Wed Jun 27, 2007 6:24 pm    Post subject:
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: 1439
Location: Bangalore,India

PostPosted: Wed Jun 27, 2007 6:43 pm    Post subject:
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

Site Director


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

PostPosted: Wed Jun 27, 2007 7:03 pm    Post subject:
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    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 How system know which REXX to excute? jackzhang75 CLIST & REXX 14 Thu Jul 06, 2017 1:09 am
No new posts Overlay the system date Danielle.Filteau SYNCSORT 4 Fri Mar 03, 2017 1:16 am
No new posts How to Capture the Max return code of... anilkumar922 All Other Mainframe Topics 2 Thu Jan 12, 2017 12:02 pm
No new posts IMS BMP program causes 878 system abend Artemk IMS DB/DC 7 Tue Nov 22, 2016 8:26 pm
No new posts Check System time(Minute) Using TIME1... balaji81_k DFSORT/ICETOOL 5 Fri Nov 11, 2016 10:53 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us