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



Suppose I have a file that is keyed on a customer number and a date, both keys ascending.

And I want to check for the *existence* of at least one record with the specified customer number and a date *no earlier than* a specified cutoff. The *contents* of that record are of no interest; all I care about is the *existence* of at least one.

I have a KLIST on my file. I plug the customer number into the first field of the KLIST, and the cutoff date into the second.

In my test program, I look for two different customer numbers, one which *does* have at least one record meeting the cutoff date, and one which *does not* have one.

If I SETLL on the KLIST, without actually reading anything, and only looking at %FOUND, then both come back with %FOUND = true, since the customer number *without* a record-of-interest just falls through to the next customer number.

If I CHAIN on the KLIST, then they both come back with %FOUND = false, since the customer number *with* a record-of-interest doesn't have one that exactly matches the date.

I *could* do a READ after the SETLL, and check to see if the customer number matches. Or I *could* do a READE on it, specifying only the customer number, and check %EOF.

Is there anything else that I'm missing?

I'm looking for maximum efficiency on this check, as it's going to have to be run for a few thousand different customer numbers.

--
JHHL

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.