× 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.



From: Scott Klement

It's not quite like SETLL -- you can't position to a particular key in
the result set -- but you don't really need to position by key when
filling a subfile.

Yes you do, when the subfile has a position to, which is typically the
reason for a SETLL. Which is when you have to have a WHERE clause in your
cursor.


You only need to be able to move forward and
backward, really. To scroll forward, you only need to know the page
size, and run a loop (or fetch into an array) that fetches the next X
records. To scroll backward, you need to know how many records you
loaded onto the current screen, plus the page size, so you can scroll
backward first by what's on the screen (to position the cursor before
them) THEN read the previous X number of records into your subfile.
With a little planning, it's actually very easy.

Unless you try to scroll past the end of the cursor, at which point it's
impossible.

If you need to position by key and then move in either direction, forward or
backward, the only way to do it is using ISAM, unless of course you are
willing to open and close cursors.

Joe


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
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.