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

Is there any way to undo the roll back associated with -911?


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Lijo

New User


Joined: 24 Aug 2008
Posts: 41
Location: Cochin

PostPosted: Tue Apr 21, 2009 12:00 pm
Reply with quote

Hi,

Scenario is as follows:
program A calls program B and then program C. Program B inserts records into table X (but no explicit commit in program B). After that program A calls Program C, which updates the record inserted by program B. Program C will find the record during its first try for update as its uses 'with UR'. During its first try program C encounters a -911 due to timeout. program C has a Retry logic, which handles -911 and tries for 3 more times. During its 2nd try, since first -911 had rolled back the insert made by program B, program C couldn't find any records for update and abends with no row found.

Program A -> Program B ( inserts into table X) -> program C (update table X where it gets -911 and because of retry logic it tries again (after sometime) and gets no row found as -911 had rolled back current unit of work)

Is there any way to undo the implicit rollback associated with -911 by changing isolation levels or something???
Back to top
View user's profile Send private message
ashimer

Active Member


Joined: 13 Feb 2004
Posts: 551
Location: Bangalore

PostPosted: Tue Apr 21, 2009 2:41 pm
Reply with quote

Instead of undoing the rollback why not try and fix the occurence of deadlock itself ? is program c going for a select for existence check and then updating ? check how locksize is defined on the table ...
Back to top
View user's profile Send private message
Lijo

New User


Joined: 24 Aug 2008
Posts: 41
Location: Cochin

PostPosted: Tue Apr 21, 2009 3:17 pm
Reply with quote

-911 can be due to deadlock or timeout. Issue described above was due to timeout. Program C is not doing an existence check because, it called only when the record is present.
Back to top
View user's profile Send private message
ashimer

Active Member


Joined: 13 Feb 2004
Posts: 551
Location: Bangalore

PostPosted: Tue Apr 21, 2009 3:35 pm
Reply with quote

timeout happened as C was waiting for a lock on the table or row .. . check the locksize defined on your table ... else increase the maxlocks parameter or timout parm ... contact ur dba ..
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


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

PostPosted: Tue Apr 21, 2009 3:39 pm
Reply with quote

Quote:
Is there any way to undo the implicit rollback associated with -911 by changing isolation levels or something???


answer is NO. (though you could go to 1 row 1 page)

your solution is as Ashimer suggested and you decided to ignore.

is this batch or online?

are there other activities going-on (other jobs/programs) that also
affect this table?

why did it timeout? since you determined that it was a timeout.
Back to top
View user's profile Send private message
Lijo

New User


Joined: 24 Aug 2008
Posts: 41
Location: Cochin

PostPosted: Tue Apr 21, 2009 3:57 pm
Reply with quote

All are batch programs. Jobs are dataset triggered and it is possible that multiple jobs can execute in parallel, which will need the same resource (like table X).
In the above mentioned scenario, timeout was due to the lock on table X by another program. Why I said it is just timeout not deadlock, because in our 2nd try of program C, it was able to get that resource and go ahead with the 'update' operation.

As Ashimer said, I've already posted this to DBA, but was searching if I could get something out of here which could be of their help.

Thanks for the responses guys...
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


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

PostPosted: Tue Apr 21, 2009 4:30 pm
Reply with quote

Quote:
because in our 2nd try of program C, it was able to get that resource and go ahead with the 'update' operation.


you are contradicting your own statements (not making any sense).


Quote:
Program A -> Program B ( inserts into table X) -> program C (update table X where it gets -911 and because of retry logic it tries again (after sometime) and gets no row found as -911 had rolled back current unit of work)


how can both of these statements be true?
Back to top
View user's profile Send private message
Lijo

New User


Joined: 24 Aug 2008
Posts: 41
Location: Cochin

PostPosted: Thu Apr 23, 2009 10:36 am
Reply with quote

I've not contradicted anything. In 2nd statement I said, it was able to get the resource and hence it is going ahead with update operation. While trying to update it returns no rows found error. I didn't say that update happened successfully in my 2nd statement...
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 -> DB2

 


Similar Topics
Topic Forum Replies
No new posts Issues Converting From ZD to Signed N... DFSORT/ICETOOL 4
No new posts Back Page print direction (Duplex Pri... JCL & VSAM 3
This topic is locked: you cannot edit posts or make replies. ISREDIT Macro is not returning back t... CLIST & REXX 21
No new posts CICS Roll back partially - Need to re... CICS 4
No new posts Need a JCL to change the volume back ... JCL & VSAM 10
Search our Forums:

Back to Top