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
 
When the program abends if we Fetch the 'locked' table

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

New User


Joined: 16 Mar 2007
Posts: 9
Location: pune

PostPosted: Wed Apr 04, 2007 4:27 pm    Post subject: When the program abends if we Fetch the 'locked' table
Reply with quote

Hi,

When we lock table & run the program which have cursor on that table.
At what time program gives error? i.e. at time of opening cursor or at time of fetching.

thank you.
Back to top
View user's profile Send private message

agkshirsagar

Active Member


Joined: 27 Feb 2007
Posts: 686
Location: Earth

PostPosted: Wed Apr 04, 2007 7:00 pm    Post subject:
Reply with quote

Quote:
Theory! icon_biggrin.gif
It depends on 'locktimeout' database configuration parameter. If this is set to -1 then second program (Cursor in this case ) will wait forever for the first program to release lock.
If it is set to a finite value then and if the desired lock is not acquired before the time interval specified elapses, the waiting application receives an error and the transaction requesting thelock is rolled back.
Back to top
View user's profile Send private message
vini_srcna

Active User


Joined: 26 May 2005
Posts: 178
Location: Copenhagen, Denmark

PostPosted: Thu Apr 05, 2007 8:00 pm    Post subject:
Reply with quote

The question was: When will the timeout/deadlock occur..?

OPEN or FETCH ..?

It would depend on how the cursor is defined and when you are supplying the values to the host variables. If you have supplied the values to the host variables of the WHERE clause before OPEN, then you should get timeout at OPEN statement.

I assume you have locked the table in EXCLUSIVE MODE.
If you have locked in SHARE mode and if you query is read only with UR isolation level, you will never get -911. In fact this is a huge concept. Manuals have a good documentation on this.
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 Fetch Previous month & year in MM... girishb2 DFSORT/ICETOOL 3 Thu Sep 21, 2017 9:54 pm
No new posts Insert a Row_number into table useit DB2 2 Tue Sep 19, 2017 1:07 pm
No new posts how to see when the last read access ... Mike 1304 DB2 1 Tue Sep 12, 2017 7:52 pm
No new posts PC (UTF-8) -> z/OS (EBCDIC) -> ... prino All Other Mainframe Topics 4 Fri Sep 01, 2017 1:47 am
No new posts Adding a userid to SMTP Security table Yolanda Harvey JCL & VSAM 1 Sun Aug 13, 2017 6:16 pm

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