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 

Question on DB2 Update

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


Joined: 09 May 2003
Posts: 131
Topics: 64

PostPosted: Tue Nov 13, 2007 3:41 pm    Post subject: Question on DB2 Update Reply with quote

Hi,

If I update a column c1 for key k1 and do a select after the update in the same program,would I see the updated value in column c1 all the time?

I tried a sample program like this and I always see the updated values in the select,though I did not do a explicit commit.Please help me understand how this works?

My bind card has isolation level CS.

PERFORM A100-UPDATE
THRU A100-EXIT.

PERFORM 10 TIMES
PERFORM A200-SELECT
THRU A200-EXIT
END-PERFORM.






Thanks,
Vijay
Back to top
View user's profile Send private message
jsharon1248
Intermediate


Joined: 08 Aug 2007
Posts: 291
Topics: 2
Location: Chicago

PostPosted: Tue Nov 13, 2007 4:03 pm    Post subject: Reply with quote

It's part of your unit of work. You change it in your unit of work, you'll see the changed value when you select it. If you need the old values, you need to get them before the update.
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