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
 

 

Job Fails due to SQL Code -911.. Restart leads to -803

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
View previous topic :: :: View next topic  
Author Message
muhammad

New User


Joined: 25 Oct 2007
Posts: 19
Location: hyderabad

PostPosted: Fri Dec 12, 2008 9:59 am    Post subject: Job Fails due to SQL Code -911.. Restart leads to -803
Reply with quote

Hi

A program fails with -911 during a FETCH statement for a cursor.... It fetches around 30000 records properly and then -911 occurs... And i guess, those 30000 records will be inserted into another table...

The program is coded with restart logic, so that when restarting, in the next run it will ignore those inserted records in the previous run... But restaring again fails with -803..

I am not sure if something needs to be done to avoid -803, but can this -911 be handled? Can we check for -911 after the fetch statement and do somthing to have the deadlock fixed?

Suggestions please...
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: Fri Dec 12, 2008 10:45 am    Post subject:
Reply with quote

Hello,

It may be that the -803 is caused because the restart logic is incorrect. If this is true, the code needs to be corrected regardless of the -911 situation.

This from IBM on the 911 error:
Quote:
-911 THE CURRENT UNIT OF WORK HAS BEEN ROLLED BACK DUE TO DEADLOCK OR
TIMEOUT. REASON reason-code, TYPE OF RESOURCE resource-type, AND
RESOURCE NAME resource-name
Have you identified the reason-code, resouse-type, and resource-name from the problem sql statement?

More complee information on the -911 is available here:
http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/handheld/Connected/BOOKS/dsnmc0f7/2.1.7.322?
Back to top
View user's profile Send private message
muhammad

New User


Joined: 25 Oct 2007
Posts: 19
Location: hyderabad

PostPosted: Fri Dec 12, 2008 11:10 am    Post subject:
Reply with quote

Yes... I have identified the reason code, type, resource name...

What should I do with that?
Back to top
View user's profile Send private message
muhammad

New User


Joined: 25 Oct 2007
Posts: 19
Location: hyderabad

PostPosted: Fri Dec 12, 2008 11:13 am    Post subject:
Reply with quote

reason code 00C90097

resource type 210
Back to top
View user's profile Send private message
PeD

Active User


Joined: 26 Nov 2005
Posts: 456
Location: Belgium

PostPosted: Fri Dec 12, 2008 11:22 am    Post subject:
Reply with quote

Dulicate Index?
Rebuild?
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: Fri Dec 12, 2008 11:33 am    Post subject:
Reply with quote

Hello,

Quote:
Dulicate Index?
I believe this is the cause of the -803. The restart tries to inseret rows that have already been inserted (which is why i believe the restart logic needs work).

Look here for more on the 00C90097:
http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/handheld/Connected/BOOKS/dsnmc0f7/4.8.30?
Back to top
View user's profile Send private message
muhammad

New User


Joined: 25 Oct 2007
Posts: 19
Location: hyderabad

PostPosted: Fri Dec 12, 2008 12:33 pm    Post subject:
Reply with quote

yes.. issue with restart logic... i have found a fix to avoid -803...

but is there a way to handle -911???
Back to top
View user's profile Send private message
PeD

Active User


Joined: 26 Nov 2005
Posts: 456
Location: Belgium

PostPosted: Fri Dec 12, 2008 1:10 pm    Post subject:
Reply with quote

Quote:
but is there a way to handle -911???


Handled via the program : trap the SQLCODE and act with retries ... to a certain point.
Back to top
View user's profile Send private message
sushanth bobby

Senior Member


Joined: 29 Jul 2008
Posts: 1013
Location: India

PostPosted: Fri Dec 12, 2008 6:36 pm    Post subject:
Reply with quote

Muhammad,

-911, DEADLOCK or TIMEOUT.

if you are fetching data from one table(SELECT) & inserting into another table(INSERT). you can fetch the data using WITH UR; because the data you are trying to fetch, someone else is using it.

If the data is critical don't use WITH UR, reduce the number of fetches.

Sushanth
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 -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts JCL to Set Return code based on DB2 S... vinu78 DB2 17 Mon Mar 13, 2017 9:47 pm
No new posts IMS region inactive - User abend code... gthmrj IMS DB/DC 5 Tue Mar 07, 2017 12:29 pm
No new posts CA Workload Automation event code help vinu78 CA Products 10 Wed Mar 01, 2017 10:05 am
No new posts MAX-RC 88 and Return code 606 in DFH0... lind sh CICS 2 Tue Jan 24, 2017 1:23 pm
No new posts How to Capture the Max return code of... anilkumar922 All Other Mainframe Topics 2 Thu Jan 12, 2017 12:02 pm


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