Peter R. Hale, P.O. Box 8763, Boston, MA 02114
For all its handiness as a fourth generation programming language and its efficiency of record storage, ARCHIVE has one major problem: the data files(_dbf) can accumulate a lot of junk over time, and that can lead to corrupted files.
The magnitude of the problem became apparant when I was doing some housekeeping and kept track of all the file lengths.
A file of 310 records took a little over 47K of disk space. After exporting and reimporting it took only a bit over 43K – almost 9% less space.
The real advantage though was the cleaning out of all the unused bytes holding old data between records in the file. ARCHIVE no longer had to hop and skip to assemble the pieces together. The potential for corrupted databases was significantly reduced.
Next, I deleted the contents of 3 text fields in all records. The file length was unchanged. The old data was still on the file, except for the first character in each field. This file was exported and reimported and was reduced to a little under 33K – almost 25% savings.
It’s simple to do:
look “filename” (Don’t bother to open the file.)
order field$;a (This is optional, but useful if there is a field you frequently order on.)
export “temp” (When you type export <ENTER>, the quotation marks appear automatically.)
The drive will whirr creating a file called temp_exp. This file could be imported to ABACUS, as well, if the importing is by columns. However, ABACUS is limited to 254 records.)
close (This closes “filename” for safety.)
import “temp” as “file” (Again the quotes appear each time you hit the <ENTER> key. Be sure that the name you choose for importing is different from the original one.)
After the whirring ceases, do not forget to close. The imported file is an open database.