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
 

 

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

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
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    Post subject: Is there any way to undo the roll back associated with -911?
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    Post subject:
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    Post subject:
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    Post subject:
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: 6968
Location: porcelain throne

PostPosted: Tue Apr 21, 2009 3:39 pm    Post subject:
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    Post subject:
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: 6968
Location: porcelain throne

PostPosted: Tue Apr 21, 2009 4:30 pm    Post subject:
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    Post subject: Reply to: Is there any way to undo the roll back associated
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    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 CICS Roll back partially - Need to re... dwijadas CICS 4 Wed Nov 16, 2016 4:30 pm
No new posts Need a JCL to change the volume back ... Manikandesvaran D JCL & VSAM 10 Tue Oct 14, 2014 9:06 pm
No new posts Go Back (F3) has to be automized sakrat TSO/ISPF 7 Tue May 06, 2014 12:30 pm
No new posts Parse a String and divide it by 2 and... magesh23586 CLIST & REXX 6 Fri Feb 07, 2014 11:34 pm
No new posts REXX-Undo Expanded copybooks statemen... ezhavendhan TSO/ISPF 12 Mon Aug 19, 2013 7:52 pm


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