Highest record number used?
Kenneth Brody
kenbrody at bestweb.net
Wed Jan 31 09:31:46 PST 2007
Quoting Mike Schwartz (Wed, 31 Jan 2007 10:09:43 -0600):
> One of my customers was wondering if there is a way to quickly find
> the highest record number (either allocated or in use) in a filePro file.
NUMRECS() will return the number of records (all, not just used) in
the file.
> If he could do a lookup to record number 9999999 with a "less than"
> option, he says that would work perfectly for him.
While GETNEXT and GETPREV on a record number lookup will skip over
intervening unused/deleted records, the initial lookup will succeed
only if the record exists.
> He wants to use it to trigger some file trimming processes and to
> do some hour-by-hour error message logging. If he could easily get hold
> of the highest record number on each file, he could write one generic
> process to monitor the daily change in number of records on each of his
> thousands of qualifier files.
[...]
Don't forget that, if the file contains deleted records, they will be
used first. It's possible that the number of records in the file, and
even the highest-used record number, won't change in such cases.
--
KenBrody at BestWeb dot net spamtrap: <g8ymh8uf001 at sneakemail.com>
http://www.hvcomputer.com
http://www.fileProPlus.com
More information about the Filepro-list
mailing list