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
 

 

SQL Commit

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
View previous topic :: :: View next topic  
Author Message
meenakshi_forum
Warnings : 1

Active User


Joined: 27 May 2008
Posts: 121
Location: India

PostPosted: Mon Apr 26, 2010 3:42 pm    Post subject: SQL Commit
Reply with quote

Hi,

Suppose there is a cursor which is expected to(this is just an assumption) to fetch 1000 records but after fetching every 2nd record the tracnscations are expected to be commited, then what would happen to the cursor?

Thanks!
Back to top
View user's profile Send private message

Escapa

Senior Member


Joined: 16 Feb 2007
Posts: 1399
Location: IL, USA

PostPosted: Mon Apr 26, 2010 3:47 pm    Post subject:
Reply with quote

The best would be "try yourself" and then if you are blank about why this is happening "so" post it here.
Back to top
View user's profile Send private message
Kjeld

Active User


Joined: 15 Dec 2009
Posts: 365
Location: Denmark

PostPosted: Mon Apr 26, 2010 4:04 pm    Post subject:
Reply with quote

Hint: It makes a difference if you define you cursor with WITH HOLD or not.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6968
Location: porcelain throne

PostPosted: Mon Apr 26, 2010 4:05 pm    Post subject:
Reply with quote

look-up the WITH HOLD clause, in a db2 manual, or try google.
Back to top
View user's profile Send private message
sushanth bobby

Senior Member


Joined: 29 Jul 2008
Posts: 1013
Location: India

PostPosted: Mon Apr 26, 2010 6:59 pm    Post subject:
Reply with quote

meenakshi_forum, Hi

Why do you want to fetch a record and commit ?

Are you updating anything ?

Sushanth
Back to top
View user's profile Send private message
Kjeld

Active User


Joined: 15 Dec 2009
Posts: 365
Location: Denmark

PostPosted: Mon Apr 26, 2010 7:13 pm    Post subject:
Reply with quote

If you use checkpoint/restart logic your output dataset is part of the LUW. Besides you might want to release any locks held.
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 Commit limit for Delete query through... mf_karthik DB2 10 Thu Dec 17, 2015 12:56 am
No new posts Commit a DB2 Table on Unix Server and... Vinodh S DB2 3 Sun Apr 12, 2015 5:05 am
No new posts Need information on DB2 COMMIT sivasaras COBOL Programming 9 Wed Jun 11, 2014 7:34 pm
No new posts DB2 Commit thru Xpediter kinatingopi DB2 4 Wed Apr 30, 2014 4:46 am
No new posts Regarding commit in cics calling db2 ... ram_vizag CICS 7 Wed Feb 05, 2014 10:56 am


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