× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Dan,

For the "Position to" I would try to declare two cursors:
one for reading which is always open
the second with a Where-clause closed and opened appropriately.

When a user fills in a Position to, close the second cursor, open it again 
(perhaps a prepare required as well) and retrieve the RRN of the first record 
in that cursor.

Use that RRN on the Fetch Relative on the first cursor.

Just a thought, to add to the other suggestions already made.

Regards,
Carel Teijgeler.

*********** REPLY SEPARATOR  ***********

On 13-10-04 at 11:09 Dan Bale wrote:

>I thought I had seen references to this before, but I am coming up empty
>searching the archives both from the search page and from google.
>
>I have a subfile inquiry app that currently loads the subfile a page at a
>time via SETLL and a READ loop.  Paging works as expected; Page Down gets
>the next set of records following the one appearing at the bottom of the
>current page, and Page Up gets the set of records prior to the one appearing
>at the top of the current page.  There is also a "Position To:" entry  the
>top that invokes the SETLL.
>
>I am attempting to introduce new features that require SQL FETCH to replace
>the SETLL, READ, and READP operations.  (Note, FWIW, this is _not_ READE or
>READPE.)  Well, not really sure how to replace the SETLL part.  I think I
>understand that I would use FETCH NEXT to emulate READ and FETCH PREVIOUS to
>emulate READP.
>
>I think I would know how to handle the Page Down routine --- just do another
>iteration of FETCH NEXT for a new page.  But the Page Up routine, this one's
>a bugger.  Since I load a subfile page from top to bottom, the SQL cursor is
>positioned at the record that appears at the bottom of the subfile.  In
>normal RPG I/O, when a Page Up is requested, I would just SETLL using the
>first subfile record, and READP from there.  I'm just not getting how I
>would accomplish this using embedded SQL.




As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.