Portal | IBM Manuals | Downloads | Products | Refer | Info | Programs | JCLs | Forum Rules*| Site Map | Mainframe CD 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index
 
Register
 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index FAQ Search Memberlist Usergroups Profile Log in to check your private messages Log in
 
Sqlcode -502 saying that cursor is already open

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
Author Message
murugan_mf

New User


Joined: 31 Jan 2008
Posts: 49
Location: Chennai, India

PostPosted: Thu Oct 16, 2008 7:52 pm    Post subject: Sqlcode -502 saying that cursor is already open
Reply with quote

Hi all,

While executing a program I got sqlcode=-501 saying that cursor is already open when trying to open.

Can you please suggest me on what possible reasons I may get this one.
Back to top
View user's profile Send private message
References
Robert Sample

Senior Member


Joined: 06 Jun 2008
Posts: 1173
Location: Atlanta, GA

PostPosted: Thu Oct 16, 2008 7:56 pm    Post subject:
Reply with quote

Program loop? Invalid program logic? Not closing the cursor when you should? I don't know DB2 but the error message seems pretty obvious to me.
Back to top
View user's profile Send private message
dick scherrer

Global Moderator


Joined: 23 Nov 2006
Posts: 9198
Location: 221 B Baker St

PostPosted: Thu Oct 16, 2008 9:18 pm    Post subject:
Reply with quote

Hello,

Quote:
Can you please suggest me on what possible reasons I may get this one.
Coding error icon_neutral.gif

DB2 will not tell you it is already open if it is not. . .

Time to follow your code thru and correct the logic.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1