There is a Web services program which fetches data using a cursor(Cobol DB2 program) and displays on an HTML front end screen
There was a limit of maximum 500 rows to be displayed considering that its a very complex SQL statement within the cursor and would affect the system performance.
I am now changing the program to give an option to the users to navigate all rows by providing a next and prev buttons in the screen(screen changes are easy)
What I would like to do now is write a statement(modify the existing cursor or whatever) that allows the cursor to be able to navigate to the next set of rows(initially it shows 500 only rows(there is a fetch first 500 rows only statement). When the user clicks next he should get 501 - 1000 and so on) when the next option is clicked selects a specific number of rows (in my case 500).
I would like to link it to a web page that uses the keys < > to scroll though the first 500 records in the table and then the next 500 forward or back, until it hits the end of the rows.
I need examples statements of the Cursor syntaxes as to how this could be achieved.
I hope this explains the situation somewhat. If you require more information, I could supply it. If you can help or give ideas or examples that would be great.