MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Will SPUFI lock the table ?

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Database
View previous topic :: View next topic  
Author Message
Ranjish
Beginner


Joined: 22 Dec 2002
Posts: 64
Topics: 28
Location: Chennai

PostPosted: Thu Oct 23, 2003 8:47 am    Post subject: Will SPUFI lock the table ? Reply with quote

Hi,

When we execute a SELECT query in a SPUFI and at the same time run a program which will try to delete the same rows, will the program abend ?

I had a case where the SELECT was executed and the output was displayed. But when an online transaction tried to delete the rows same time, it was hanging.

So when we are browsing the SPUFI output, is the table still under hold ?

Thanks
Ranjish
Back to top
View user's profile Send private message
Bithead
Advanced


Joined: 03 Jan 2003
Posts: 550
Topics: 23
Location: Michigan, USA

PostPosted: Thu Oct 23, 2003 10:06 am    Post subject: Reply with quote

SPUFI selects can lock out online transactions if the results are left open. I know from experience.
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12382
Topics: 75
Location: San Jose

PostPosted: Thu Oct 23, 2003 10:48 am    Post subject: Reply with quote

Ranjish,

I guess you have defaulted your spufi isolation level to RR (RR=Repeatable Read). With repeatable read (RR) isolation, DB2 acquires the X(exclusive) locks on all pages or rows that fall within the range of the selection expression. All X locks are held until the application commits. Although this option can reduce concurrency, it can prevent some types of deadlocks and can better serialize access to data.

change that isolation level to CS and you will not hold the data.

Also when you are just selecting rows from spufi or QMF try coding WITH UR after the select statement , so that you are not holding up any resource.

Hope this helps...

Cheers

kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Bithead
Advanced


Joined: 03 Jan 2003
Posts: 550
Topics: 23
Location: Michigan, USA

PostPosted: Thu Oct 23, 2003 10:57 am    Post subject: Reply with quote

We change it when it happens (it is hard for the user to change it since we have cut their fingers off....)
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12382
Topics: 75
Location: San Jose

PostPosted: Thu Oct 23, 2003 11:11 am    Post subject: Reply with quote

Bithead,

Quote:

We change it when it happens (it is hard for the user to change it since we have cut their fingers off....)


Do you meant to say that on Spufi panel , change defaults option is not changeable?

Code:

Specify processing options:                                               
 5 CHANGE DEFAULTS   ===>    YES      (Y/N - Display SPUFI defaults panel?)


or did you fix on the next panel?

Code:

Enter the following to control your SPUFI session:                             
 1  SQL TERMINATOR .. ===>    ;     (SQL Statement Terminator)               
 2  ISOLATION LEVEL   ===>    CS       (RR=Repeatable Read, CS=Cursor Stability)
 3  MAX SELECT LINES  ===>    1000     (Maximum number of lines to be 
                                          returned from a SELECT)             
Output data set characteristics:                                               
 4  RECORD LENGTH ... ===>    4092       (LRECL=Logical record length)           
 5  BLOCK SIZE ...... ===>    4096       (Size of one block)                     
 6  RECORD FORMAT ... ===>    VB         (RECFM=F, FB, FBA, V, VB, or VBA)       
 7  DEVICE TYPE ..... ===>    SYSDA      (Must be DASD unit name)                   
Output format characteristics:                                               
 8  MAX NUMERIC FIELD ===>    33       (Maximum width for numeric fields)       
 9  MAX CHAR FIELD .. ===>    80       (Maximum width for character fields)     
10  COLUMN HEADING .. ===> NAMES    (NAMES, LABELS, ANY or BOTH)             


I would be upset if they don't let me change any of the following

1.MAX SELECT LINES
2.RECORD LENGTH
3.BLOCK SIZE
4.RECORD FORMAT


What would be logical reasoning for not allowing users to change the defaults?. I can understand locking, but the other parameters???

Kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Ranjish
Beginner


Joined: 22 Dec 2002
Posts: 64
Topics: 28
Location: Chennai

PostPosted: Thu Oct 23, 2003 11:28 am    Post subject: Reply with quote

Kolusu,

Thank you very much for your reply.

Regards
Ranjish
Back to top
View user's profile Send private message
Bithead
Advanced


Joined: 03 Jan 2003
Posts: 550
Topics: 23
Location: Michigan, USA

PostPosted: Thu Oct 23, 2003 11:36 am    Post subject: Reply with quote

Kolusu,

They can change it, they just don't know that they have to.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Database All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group