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 

Help Reg SQL -508
Goto page Previous  1, 2
 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Database
View previous topic :: View next topic  
Author Message
dbzTHEdinosauer
Supermod


Joined: 20 Oct 2006
Posts: 1411
Topics: 26
Location: germany

PostPosted: Tue Aug 28, 2007 1:01 pm    Post subject: Reply with quote

What version db2? You should not beable to pre-compile this cursor definition:

UPDATE WITH ORDER BY
_________________
Dick Brenholtz
American living in Varel, Germany
Back to top
View user's profile Send private message
edkir98
Beginner


Joined: 27 Aug 2007
Posts: 102
Topics: 42
Location: Chennai

PostPosted: Tue Aug 28, 2007 1:20 pm    Post subject: Reply with quote

Folks I finally got it right..
I removed the WHERE CURRENT OF clause and put WHERE <PRIMARY KEY> = <VALUE>

It works fine.

I was using commit/Restart logic after fetch. may be that caused the cursor to dis-position. I'm not sure though
_________________
Thanks
Back to top
View user's profile Send private message Yahoo Messenger
jsharon1248
Intermediate


Joined: 08 Aug 2007
Posts: 291
Topics: 2
Location: Chicago

PostPosted: Tue Aug 28, 2007 2:06 pm    Post subject: Reply with quote

edkir98
You eliminated the symptom, but I think the problem is probably still there. I'd double check that restart logic. I'd also be very concerned with commit processing after a FETCH. I would think it belongs wherever your unit of work ends, which would typically be after all INSERT/UPDATE/DELETE processing, not after a FETCH.

dbzTHEdinosaur
Good point about the ORDER BY. That makes the cursor read-only even in V9, so I'm not sure what we've been looking at.
Back to top
View user's profile Send private message
dbzTHEdinosauer
Supermod


Joined: 20 Oct 2006
Posts: 1411
Topics: 26
Location: germany

PostPosted: Tue Aug 28, 2007 2:58 pm    Post subject: Reply with quote

edkir98,

Thx for the feedback. Glad everything is alright now.

jsharon1248,

don't ask. you will only get another answer.
_________________
Dick Brenholtz
American living in Varel, Germany
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
Goto page Previous  1, 2
Page 2 of 2

 
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