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 

Fetch keeps returning the same record

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


Joined: 24 Feb 2005
Posts: 33
Topics: 17

PostPosted: Wed Dec 23, 2009 6:03 pm    Post subject: Fetch keeps returning the same record Reply with quote

Did anyone face the same problem I am having. Cursor FETCH keeps returning the same record again and again. If I use SPUFI it returns 19 records, but in the Application program it does not work. The application is coded as below.
OPEN
FETCH and process in loop
CLOSE
Back to top
View user's profile Send private message
dbzTHEdinosauer
Supermod


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

PostPosted: Wed Dec 23, 2009 6:57 pm    Post subject: Reply with quote

1. FETCH returns rows not records.

2. what does your DECLARE Cursor look like?

3. what does your FETCH look like?

4. what code are you executing that tells you that your FETCH is returning the same row, because it will not. Are you checking your SQL CODE after each FETCH.
_________________
Dick Brenholtz
American living in Varel, Germany
Back to top
View user's profile Send private message
Terry_Heinze
Supermod


Joined: 31 May 2004
Posts: 391
Topics: 4
Location: Richfield, MN, USA

PostPosted: Wed Dec 23, 2009 7:22 pm    Post subject: Reply with quote

Quote:
process in loop

I think you need to show what happens here. Show ALL relevant code, and please use BBCode.
_________________
....Terry
Back to top
View user's profile Send private message Send e-mail
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