MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Cursor open

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Database
View previous topic :: View next topic  
Author Message
krk123
Beginner


Joined: 03 Jun 2003
Posts: 58
Topics: 19

PostPosted: Mon Nov 15, 2004 12:51 pm    Post subject: Cursor open Reply with quote

Hi,
I am working on a new DB2 program. In the program I have 3 cursors, cursor-1, cursor-2 and crusor-3. Is there a way I can use the same open statement for all the 3 cursor's ? Some thing like
EXEC SQL
OPEN WS-CURSOR
END-EXEC
and I can pass values to WS-CURSOR DEPENDING on the cursor I am opening. Any help or link to a manual is appreciated.

Thanks,
Krk123.
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Mon Nov 15, 2004 1:05 pm    Post subject: Reply with quote

krk123,

Not possible with static SQL. With dynamic SQL you can do it

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
krk123
Beginner


Joined: 03 Jun 2003
Posts: 58
Topics: 19

PostPosted: Mon Nov 15, 2004 1:12 pm    Post subject: Cursor Open. Reply with quote

Thanks Kolusu.
Back to top
View user's profile Send private message
CRaviKota
Beginner


Joined: 24 Dec 2006
Posts: 10
Topics: 3

PostPosted: Tue Jan 16, 2007 10:35 pm    Post subject: Reply with quote

Kolusu, you mentioned that above req is possible with Dynamic SQL. Does it mean that we use positional parameters in the place of the cursor name just like given below and we need to bind the cursor name before we call this statement. Can you explain this with a small example.

Open ?
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Database All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group