IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

how to calculate and maintain Row position in DB2


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
seema_285

New User


Joined: 14 Oct 2010
Posts: 13
Location: pune

PostPosted: Mon Feb 25, 2013 3:32 pm
Reply with quote

Hi ,

I have a requirement like below :

for particular data if there are more than 500 records in table then at single point of time <= 500 recs will be fetched and displayed on web.

e.g. if there are 1400 records, then during first call of SP, first 500 i.e. 1st to 500th records will be displayed. at this time NEXT link on web will be enabled and when user clicks NEXT , 501th to 1000th records should be fetched and displayed. at this time both PREV and NEXT links will be enabled. if user clicks NEXt then 1001th to 1400th records should be displayed. if user Clicks PREV then in first PREV 501th to 1000th records should again fetched and displayed and in second PREV click 1st to 500th records should be diplayed.

To fulfil this, I wanted to know if we can calculate and maintain row position , and setting the upper and lower limit of this row position can we fetch data in DB2 cursor ?

Please help on this or any other suggestion/reference will be highly appreciated.

Thanks in advance.
Back to top
View user's profile Send private message
PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2481
Location: Netherlands, Amstelveen

PostPosted: Mon Feb 25, 2013 7:33 pm
Reply with quote

Look into "scrollable cursors".
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts INCLUDE OMIT COND for Multiple values... DFSORT/ICETOOL 5
No new posts how to calculate SUM value for VB fil... DFSORT/ICETOOL 1
No new posts how to calculate SUM for VB file usin... JCL & VSAM 1
No new posts parsing variable length/position data... DFSORT/ICETOOL 5
No new posts Maintain LIVE data for many sysplexes... PL/I & Assembler 6
Search our Forums:

Back to Top