Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

help required for cursor with update of...

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
View previous topic :: :: View next topic  
Author Message
Ketan Varhade

Active User


Joined: 29 Jun 2009
Posts: 197
Location: Mumbai

PostPosted: Tue Jul 28, 2009 1:54 pm    Post subject: help required for cursor with update of...
Reply with quote

Hi,
I have a cursor that is fetching some rows from a table and at the time of declaration I have given as for update of the same table from which I am fetching the values.

Now what process is like that I fetch a value from the table and perform some operation and then insert/update the values in that table, after the update/insert I do the commit.
So I would like to ask is that when I commit that table, will those updated value be there in the cursor .

Regards
Ketan Varhade
Back to top
View user's profile Send private message

Srihari Gonugunta

Active User


Joined: 14 Sep 2007
Posts: 295
Location: Singapore

PostPosted: Tue Jul 28, 2009 2:17 pm    Post subject:
Reply with quote

Ketan,
Once you use Fetch cursor and update the current row, it doesn't really matter for you if its updated in the cursor or not, as you will not be able to access that row again unless you re-open the cursor or use a select statement to read that row, which will definitely have the updated value as its committed.
Back to top
View user's profile Send private message
Bharath Bhat

Active User


Joined: 20 Mar 2008
Posts: 283
Location: chennai

PostPosted: Tue Jul 28, 2009 3:43 pm    Post subject:
Reply with quote

Whenever you issue a commit, all the open cursors will be closed, unless its a
Code:
CURSOR WITH HOLD
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 Testing rerad cursor for status with ... John F Dutcher DB2 8 Fri May 19, 2017 9:35 pm
No new posts Fileaid Update Replace with null string descann Compuware & Other Tools 4 Mon May 15, 2017 3:00 pm
This topic is locked: you cannot edit posts or make replies. Merge two files and update Trailer re... Yashashri JCL & VSAM 1 Thu May 04, 2017 12:54 pm
No new posts Getting -504 Cursor Name GTT-ARTS-CUR... Robin Sulsona DB2 2 Fri Mar 17, 2017 1:43 am
No new posts IMS DB-How to update a record (a sing... Nic Clouston IMS DB/DC 9 Thu Mar 09, 2017 4:38 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us