Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Cursor with hold for

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

New User


Joined: 21 Jul 2007
Posts: 1
Location: phoenix

PostPosted: Sat Dec 11, 2010 8:00 pm    Post subject: Cursor with hold for
Reply with quote

Hi,

I want to know where to use the Cursor with hold while declaring a cursor. I know that if we do not use a cursor with hold for then while we issue a commit statement then the cursor is closed and reopened which is a overhead. To avoid this cursor with hold for is used. But does this mean that then every cursor declared should have a cursor with hold for option or is there any specific scenario where I should use it. I have gone through the manuals and forum but can't decide where to use it and where not to use it. Can you provide some example or scenario where I should be using it.

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

dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Sun Dec 12, 2010 2:30 am    Post subject:
Reply with quote

Hello and welcome to the forum,

It sounds as though you have a solution in search of a requirement. . .

Suggest you invest your time on this when the requirement has presented itself.

Also, if COMMITs are issued only at the end of some logical unit of work, they will not be issued very often and thus will not cause much overhead. . . Due to faster CPUs and dasd, many organizations no longer use COMMITs within a process. . .
Back to top
View user's profile Send private message
Dsingh29

Active User


Joined: 16 Dec 2008
Posts: 132
Location: IBM

PostPosted: Mon Dec 13, 2010 3:57 pm    Post subject: Reply to: Cursor with hold for
Reply with quote

One of the scenerio may be like....you have cursor within a cursor...and you want to commit inner cursor for every row fetch of outer cursor..in that case... you may need to declare the outer cursor with hold option so that it doesnot closes when commit is issued for inner cursor.


suggestions welcom, correct me if I am wrong.
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 -502 Error - Cursor already open anand jeyapaul DB2 7 Sun Oct 29, 2017 4:22 am
No new posts Update table without cursor Ron Klop DB2 3 Wed Oct 11, 2017 1:06 pm
No new posts Testing rerad cursor for status with ... John F Dutcher DB2 8 Fri May 19, 2017 9:35 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 Release of Adabas Cursor mohitsethi All Other Mainframe Topics 1 Mon Feb 06, 2017 8:36 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us