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 

sequencial read a database records

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


Joined: 05 Jan 2006
Posts: 43
Topics: 14

PostPosted: Fri Jan 13, 2006 7:07 am    Post subject: sequencial read a database records Reply with quote

Hi,

My requirement is to read all the records sequencial. The Primary key is not a sequencial number and so we can not incorporate a logic to fetch one after the othe.

Is there a feild in DB2 like row ID, which is a unique incremental number by which we can fetch one after the other.

It would be of great help.

Thanks
Manoj Voona
Back to top
View user's profile Send private message Send e-mail
kolusu
Site Admin
Site Admin


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

PostPosted: Fri Jan 13, 2006 8:09 am    Post subject: Reply with quote

manojvoona,

What exactly do you mean sequential? DB2 does NOT gurantee that if you load the records the sequentially , they will be stored sequentially. Db2 finds the first available page and stores the records. So if you want to maintain sequence then you need add the ROWID column to your table.

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
manojvoona
Beginner


Joined: 05 Jan 2006
Posts: 43
Topics: 14

PostPosted: Mon Jan 16, 2006 4:12 am    Post subject: Reply with quote

Thanks a lot.

Manoj Voona
Back to top
View user's profile Send private message Send e-mail
manojvoona
Beginner


Joined: 05 Jan 2006
Posts: 43
Topics: 14

PostPosted: Mon Jan 16, 2006 4:15 am    Post subject: Reply with quote

Hi Kolusu,

What is the maximum number of records that a cursor can accomedate.

thanks
Manoj Voona
Back to top
View user's profile Send private message Send e-mail
kolusu
Site Admin
Site Admin


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

PostPosted: Mon Jan 16, 2006 6:16 am    Post subject: Reply with quote

Quote:

What is the maximum number of records that a cursor can accomedate.

manojvoona,

There is no limit for the cursor. However it is suggested that you use OPTIMIZE clause on the cursor declaration.

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
manojvoona
Beginner


Joined: 05 Jan 2006
Posts: 43
Topics: 14

PostPosted: Tue Jan 17, 2006 9:22 am    Post subject: Reply with quote

thanks a lot Smile
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