IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

More than one cursor at a time


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
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
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
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
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
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts To get the the current time DFSORT/ICETOOL 13
No new posts RC query -Time column CA Products 3
No new posts C Compile time time stamps Java & MQSeries 10
No new posts Parallelization in CICS to reduce res... CICS 4
No new posts Insert system time/date (timestamp) u... DFSORT/ICETOOL 5
Search our Forums:

Back to Top