Second request-need to compress / remove empty records from an
fP key file
Bob Stockler
bob at trebor.iglou.com
Tue Jan 9 11:42:43 PST 2007
Don Coleman wrote (on Tue, Jan 09, 2007 at 10:55:52AM -0500):
| Need to try to do the following today if anyone has any suggestions.
|
| Windows native Fp5.0.13, Windows 2000 Advanced Server, WIN2000 & WINXP Pro
| clients.
|
| I have a key file which last night exceeded the 2GB limit and I can no
| longer access the data. IUA reports zero records, the fP Directory reports
| -1736042 records. I believe approximately 50% of these records are empty
| and need a way to slightly reduce the size so fP can again access the file.
| At that point I can archive the used records, delete the unused records and
| start with a new key file again.
|
| Does anyone have a method outside of fP to do this? I seem to remember Bob
| Stockler or JPR having an OS utility to "deflate" a file. Is this a UNIX
| only solution or is it available for Windows as well?
I've written a filePro program I call "deflate" that works on
Windows as well as UNIX/Linux, but I don't know how much help
it would be to you because it's the OS that imposes the 2 Gb
filesize limitation.
I also posted to the filePro Mailing List within the last week
or so what you should do, but I just looked in the mailing list
archives and don't find it there, so here it is again.
Create an Alien filePro file with its "real" file the key file
of interest.
Record length in the Alien file should be the filePro record
lenth in the key file of interest + 20.
All fields in the Alien file should be edit *.
In the Alien file define field 1 to be length 20, then define
enough fields of length 999 or less so that the record lenth
is the filePro record length in the key file + 20.
Write a processing table in the Alien file using filePro I/O
or EXPORT to write records of interest to the file "new.key".
Write the first record to "new.key", then skip all records
where the fields 2, 3, 4 ... n are empty:
If: 2 { 3 { n eq ""
Then: end
Then: ' your routines to write the record to "new.key"
At the end, write one empty record to "new.key".
Then move "key" to "old.key" and "new.key" to "key".
Run freechain on the file of interest and rebuild all indexes.
With the "key" file being larger that the OS permits, I don't
know if you'll be able to read it at all, but if you can, you
will probably lose some records at the end of it.
Good luck.
Bob
--
Bob Stockler +-+ bob at trebor.iglou.com +-+ http://members.iglou.com/trebor
More information about the Filepro-list
mailing list