Un-expanding(?) a file
Jean-Pierre A. Radley
appl at jpr.com
Wed Jul 21 13:45:23 PDT 2004
Nancy Palmquist propounded (on Wed, Jul 21, 2004 at 01:47:11PM -0400):
| Fredland at aol.com wrote:
|
| > Dear List:
| >
| > Back in 1985 or so I did a great deal of programming in filePro for
| > a small airline and ever since then one of the vendors has been
| > coming to me whenever he has a problem. In this case my memory of fp
| > is not sufficient, but the problem may contain elements of general
| > interest so here it is.
| >
| > He is running his business on vers. 4.8. He has a file containing
| > both key and data segments (very old program) and about 7000
| > records. It appears that the file has acquired about 7000 blank
| > records possibly via Expand Files(?). As a result new records are
| > often numbered 14000+. He doesn't want this to be happening (it's
| > not a functional problem - he simply doesn't like it like that) so
| > he manually moves any such new records down to the 7000 range. He
| > has gotten tired of doing this after several years and would like
| > the file "fixed". This is the gist of a phone call from him.
| >
| > If memory serves (not very well any more) there is a difference
| > between blank records and deleted records. I think, but do not
| > know, that he may be able to delete his empty blank records with
| > a simple output process and then overwrite the expand files limit
| > with a new number in the 7000 range a couple of records beyond his
| > active EOF. Once these are used then I would expect the automated
| > expand function built into FP to take over. I'm in the midst of a
| > major renovation so do not have time to research this and am loath
| > to suggest an unverified procedure. Any clarification would be
| > appreciated.
| >
| The correct solution might be to create a look-a-like file (might be a
| good time to put all the fields in the key instead of splitting them.
|
| Then copy all the records from this file to the new file. You now
| have a file with no blank records.
|
| Now this new file will have the creation date, update date and record
| numbers different from the original file, if that is ok, that is the
| solution.
|
| There is no way to shrink a file in filepro directly. You have to put
| the records somewhere else to make a smaller file.
|
| There is a solution that would retain the @cd and @ud info but with
| a key and data segment, it is much more complex. Since this guy
| keeps moving stuff around I would guess he is not interested in that
| information.
I still sell fpkd, which will throw out blank records, shrink the file,
and maintain all of the original information in the 20-byte header
records.
--
JP
More information about the Filepro-list
mailing list