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 

sqlcode -504

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


Joined: 08 Oct 2004
Posts: 192
Topics: 89

PostPosted: Mon Aug 01, 2005 2:52 am    Post subject: sqlcode -504 Reply with quote

Hi,

what is SQLCODE -504. i came to know that it comes when curssor name is invalid. i need complete details regarding that. when it occurs and how to resolve that.

thanks
nadh
Back to top
View user's profile Send private message Send e-mail
SureshKumar
Intermediate


Joined: 23 Jan 2003
Posts: 211
Topics: 21

PostPosted: Mon Aug 01, 2005 7:22 am    Post subject: Reply with quote

nadh,
It occurs when you don't declare the cursor and try to open it. Declare the cursor to resolve it.
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


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

PostPosted: Mon Aug 01, 2005 7:36 am    Post subject: Reply with quote

nadh,

Check this link for a detailed explanation of the error -504

http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/DSNMCH11/2.1.6.196?SHELF=&DT=20010718150520&CASE=

Hope this helps...

Cheers

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


Joined: 08 Oct 2004
Posts: 192
Topics: 89

PostPosted: Tue Aug 02, 2005 1:45 am    Post subject: Reply with quote

Kolusu,

if we don't declare the cursor and try to open it, at bind time we will get abend right. Pls. clarify. if we declare the cursor by one name and try to open with other name what will happen.

nadh.
Back to top
View user's profile Send private message Send e-mail
kolusu
Site Admin
Site Admin


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

PostPosted: Tue Aug 02, 2005 5:58 am    Post subject: Reply with quote

Nadh,

If you don't declare a cursor and try to open it then you will get an error during the pre-compilation it self. And the reverse is also true, if you try to open a cursor without defining it , then your will get an error during pre-compilation itself.

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


Joined: 09 Aug 2005
Posts: 1
Topics: 0

PostPosted: Tue Aug 09, 2005 6:06 am    Post subject: -504 Reply with quote

Hi all,
I am new to the group and I am going to share my exp on -504.

It happens when you are using cursor processing in db2 .
consider these screnerios.
1.
You have opened the cursor .

now you are fetching it and doing some processing.
After some time you are taking checkpoint to commit your operation.
Again you try to fetch it and you will get a -504 as the cursor table is closed because of commit.
soln: use with hold in your declare statement.

2.you have tried to close the cursor with out opening it.

There can be other scenerios also but these are the ones I faced.
Hope this helps.
Raghesh Gopinath
Back to top
View user's profile Send private message Yahoo Messenger
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