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

Isolation level - Repeatable Read


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

New User


Joined: 31 Mar 2005
Posts: 5
Location: London

PostPosted: Wed May 03, 2006 1:07 pm
Reply with quote

Hi,

I wonder if someone can help with a design that I have been given to code and I am not sure it will work.
The objective is to insert rows into a database, however before hand we want to use a common validation module. This validation module will check for the existence of the row, if it is found then a reply is sent to the user. However if it is not the designer wants us to use repeatable read so that the "space" or "slot" will not be used by anyone before we then go to another module to do the insert. They are trying to make generic validation modules and insert modules. So we do not want the insert to fail due to the fact another transaction has inserted a row into the databse with the same key.
Hope this makes sense. My question is that on a singleton selection using WITH RR, if this row does not exist will the empty slot be held until the next commit point.

Thanks in advance
Back to top
View user's profile Send private message
hikaps14

Active User


Joined: 02 Sep 2005
Posts: 189
Location: Noida

PostPosted: Wed May 03, 2006 5:28 pm
Reply with quote

hi,

if u r using RR isolation then no one else can else can access ur table
( except only UR level isolation which can't be update) .

so don't worry about any updations at all .

i hope i hav got ur Querry correctly .

plz do correct me if u find me wrong .

Thanks ,
-Kapil
Back to top
View user's profile Send private message
MSMITHUK

New User


Joined: 31 Mar 2005
Posts: 5
Location: London

PostPosted: Wed May 03, 2006 8:46 pm
Reply with quote

Thanks for your reply. However I am more concerned with rows that might be inserted during my Unit Of Work with the predicate that I have validated with.

An E.G.

UOW starts

Call Validation
- Select 1 from MYTABLE where surname = 'SMITH' With RR
* The result from this is +100 row not found *

Call Process
- Insert surname values('SMITH') into MYTABLE

COMMIT

I do not want the insert to fail due to someone inserting a row with the surname of "SMITH" after my validation module but before my process module.

I am wondering if you can hold the primary key of 'SMITH' before actually inserting it.

Cheers
Moira
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 Error to read log with rexx CLIST & REXX 11
No new posts How to load to DB2 with column level ... DB2 6
No new posts Random read in ESDS file by using RBA JCL & VSAM 6
No new posts VSAM return code 23 - for a Random read COBOL Programming 4
No new posts ISRSUPC search utility - using high l... TSO/ISPF 2
Search our Forums:

Back to Top