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
 
More than one cursor at a time

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

New User


Joined: 05 Apr 2005
Posts: 5
Location: Hyderabad

PostPosted: Tue Apr 05, 2005 9:20 pm    Post subject: More than one cursor at a time
Reply with quote

Hi,
Can we declare and open more than one cursor at a time for the same table. At the same time can we fetch one row by using select statemnet when the cursor is already opened for the same table.

Will be waiting for answer....


smgaru
Back to top
View user's profile Send private message

ovreddy

Active User


Joined: 06 Dec 2004
Posts: 211
Location: Keane Inc., Minneapolis USA.

PostPosted: Wed Apr 06, 2005 11:41 am    Post subject:
Reply with quote

Hi SMGaru,

I never tried this multiple cursor situation. But Surely I am confident that Multiple cursor senario will work. Because Assume 2 Procedures using the cursors on same table. We can call them simultaniously. So it will work.

Your second question, when a cursor is opened on a table then a select will fetch the rows normally. This i tried many times and worked. Try multiple cursor senario and let us know the results.

Thanks for your good question,
Reddy.
Back to top
View user's profile Send private message
ajaychandra

New User


Joined: 31 Mar 2005
Posts: 16
Location: Bangalore

PostPosted: Thu Apr 14, 2005 3:30 pm    Post subject:
Reply with quote

Dear Friend,

Multiple cursors can be decleared for the same table.

Assume T is the Table name then T can have more than one cursor decleared on it. Say C1 and C2 are the cursors decleared on T. Initially if cursor C1 is opened, C2 cannot be opened untill the cursor C1 is closed. Hense you cannot fetch data at the same time.

Any Suggestions are welcome.........

Ajay Chandra
Back to top
View user's profile Send private message
learnmf

Active User


Joined: 14 Mar 2005
Posts: 123

PostPosted: Fri Apr 15, 2005 7:51 pm    Post subject:
Reply with quote

Quote:
Hi,
Can we declare and open more than one cursor at a time for the same table. At the same time can we fetch one row by using select statemnet when the cursor is already opened for the same table.


HI FRiend
IT can posssible to declare more then one cursor at a time.

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

New User


Joined: 22 Jan 2004
Posts: 4

PostPosted: Wed Apr 20, 2005 5:45 pm    Post subject: Re: More than one cursor at a time
Reply with quote

Hi,

We can use both cursors at a time by specifying ?WITH UR? option.

Rajesh icon_smile.gif
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 Update table without cursor Ron Klop DB2 3 Wed Oct 11, 2017 1:06 pm
This topic is locked: you cannot edit posts or make replies. 00D3003B - time outs in DB2 when invo... chavinash2004 DB2 2 Mon Oct 09, 2017 4:39 pm
No new posts VSAM RLS Wait time blayek JCL & VSAM 2 Mon Oct 02, 2017 9:05 pm
No new posts Comparing 2 Files using Current time arunsoods SYNCSORT 9 Fri Sep 22, 2017 6:00 pm
No new posts Regarding time parameter shanthi gude JCL & VSAM 7 Mon Sep 04, 2017 2:31 pm

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