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 

No of rows returned by a cursor

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


Joined: 31 Aug 2005
Posts: 51
Topics: 27

PostPosted: Fri Jul 18, 2008 2:39 am    Post subject: No of rows returned by a cursor Reply with quote

Hi,
I there a way to find the no of rows returned by a cursor without executing a Count(*), I beleive there is a SQLCA variavle sqlerrd(3) which returns no of rows inserted/updated not sure if it will return for a select ,

Thanks
Ganesh
Back to top
View user's profile Send private message
CZerfas
Intermediate


Joined: 31 Jan 2003
Posts: 211
Topics: 8

PostPosted: Fri Jul 18, 2008 2:57 am    Post subject: Reply with quote

Short answer: No, there isn't.

But you could count your number of fetches.

regards
Christian
Back to top
View user's profile Send private message
Eric.C.Bakke
Beginner


Joined: 14 Jul 2008
Posts: 15
Topics: 0
Location: Plano, TX

PostPosted: Fri Jul 18, 2008 3:14 pm    Post subject: Reply with quote

If you are on DB2 V8 NFM or above, you could do a multi-row fetch in a cursor (better performance) where you can and will want to evaluate sqlerr3 for the number of rows returned in a single multi-row fetch. I highly recommend this approach over using single row fetch methods of the past for 100 rows of data or more.

Singleton inserts, updates, and deletes can be done in a multi-row fashion as well and it will dramatically improve bulk processing.
_________________
Eric C. Bakke
Senior DB2 DBA
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
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