Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Scrollable Cursor Syntax

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
View previous topic :: :: View next topic  
Author Message
Taurus

New User


Joined: 04 Jan 2013
Posts: 3
Location: India

PostPosted: Fri Jan 04, 2013 7:33 pm    Post subject: Scrollable Cursor Syntax
Reply with quote

I am in need of a Scrollable Cursors syntax

Requirement:
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.


Cheers
Taurus
Back to top
View user's profile Send private message

Pandora-Box

Moderator


Joined: 07 Sep 2006
Posts: 1534
Location: Andromeda Galaxy

PostPosted: Fri Jan 04, 2013 10:42 pm    Post subject:
Reply with quote

But why do you need a scrollable cursor?

Is it particular to achieve it using scrollable cursor?
Back to top
View user's profile Send private message
Taurus

New User


Joined: 04 Jan 2013
Posts: 3
Location: India

PostPosted: Mon Jan 07, 2013 2:18 pm    Post subject: Reply to: Scrollable Cursor Syntax
Reply with quote

Hello,
It is not a mandate that I need to use Scrollable cursors, but I thought that this would be the best/simplest way to achieve this solution


Cheers
Taurus
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Mon Jan 07, 2013 4:58 pm    Post subject:
Reply with quote

What release of DB2 you are at? (pressuming DB2 7 and higher)

This is from DB2 8: (Out of service and I leave the exercise to find the IBM documentation for your release of DB2)

http://publib.boulder.ibm.com/infocenter/dzichelp/v2r2/index.jsp?topic=%2Fcom.ibm.db2.doc.apsg%2Fqscroll.htm

An article you might be interested in: http://searchdatamanagement.techtarget.com/answer/How-and-when-to-use-DB2-scrollable-cursors
Back to top
View user's profile Send private message
Taurus

New User


Joined: 04 Jan 2013
Posts: 3
Location: India

PostPosted: Mon Jan 07, 2013 5:03 pm    Post subject: Hello
Reply with quote

Hello Anuj,
Thanks for taking time, I currently am on the Version 7. I found some interesting stuff which can be used on version 8 unfortunately I cannot use that icon_sad.gif

Cheers
Taurus
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Testing rerad cursor for status with ... John F Dutcher DB2 8 Fri May 19, 2017 9:35 pm
No new posts Getting -504 Cursor Name GTT-ARTS-CUR... Robin Sulsona DB2 2 Fri Mar 17, 2017 1:43 am
No new posts FINDREP Syntax Error seahawk789 DFSORT/ICETOOL 4 Thu Mar 09, 2017 10:11 pm
No new posts Release of Adabas Cursor mohitsethi All Other Mainframe Topics 1 Mon Feb 06, 2017 8:36 pm
No new posts Updating Cursor row withour using FOR... chandan.inst DB2 15 Tue Nov 08, 2016 11:17 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us