View previous topic :: View next topic |
Author |
Message |
krk123 Beginner

Joined: 03 Jun 2003 Posts: 58 Topics: 19
|
Posted: Mon Nov 15, 2004 12:51 pm Post subject: Cursor open |
|
|
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 |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
|
Posted: Mon Nov 15, 2004 1:05 pm Post subject: |
|
|
krk123,
Not possible with static SQL. With dynamic SQL you can do it
Kolusu _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
 |
krk123 Beginner

Joined: 03 Jun 2003 Posts: 58 Topics: 19
|
Posted: Mon Nov 15, 2004 1:12 pm Post subject: Cursor Open. |
|
|
Thanks Kolusu. |
|
Back to top |
|
 |
CRaviKota Beginner
Joined: 24 Dec 2006 Posts: 10 Topics: 3
|
Posted: Tue Jan 16, 2007 10:35 pm Post subject: |
|
|
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 |
|
 |
|
|