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 query to fetch record which has only ... maxsubrat DB2 12 Mon Dec 11, 2017 5:03 pm
No new posts The same REXX program doesnt work for... jackzhang75 CLIST & REXX 5 Wed Dec 06, 2017 2:51 am
This topic is locked: you cannot edit posts or make replies. Cobol to fetch the content by using s... arunc55 COBOL Programming 4 Fri Nov 17, 2017 1:25 pm
No new posts Calling IKJEFT01 program from Rexx upendrasri CLIST & REXX 8 Wed Nov 15, 2017 4:27 pm
No new posts How to write Rexx program to size and... sreejeshcs CLIST & REXX 14 Thu Oct 12, 2017 7:26 am

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