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

Sqlcode -502 saying that cursor is already open


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
murugan_mf

Active User


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

PostPosted: Thu Oct 16, 2008 7:52 pm
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
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Thu Oct 16, 2008 7:56 pm
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

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Thu Oct 16, 2008 9:18 pm
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
cesaralt

New User


Joined: 19 Oct 2009
Posts: 3
Location: LIMA-PERU

PostPosted: Mon Jul 01, 2013 7:00 am
Reply with quote

Hi,
Very interesting, Where Can I find more information about it.

Regards,
Cesa A.

dick scherrer wrote:
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
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Mon Jul 01, 2013 2:56 pm
Reply with quote

Do you have a new question? icon_confused.gif
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Mon Jul 01, 2013 7:11 pm
Reply with quote

Hello,

Quote:
Where Can I find more information about it


Clarify "it". I do not understand what you are asking.
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 Calling an Open C library function in... CICS 1
No new posts Open VSAM File in IMS DC Region - DFS... IMS DB/DC 0
No new posts DFHCSDUP EXTRACT unable to open outpu... CICS 5
No new posts SQLCODE = -122 while using the scalar... DB2 4
No new posts SQLCODE = -16002 when using XMLEXISTS DB2 1
Search our Forums:

Back to Top