Un-expanding(?) a File

Bob Stockler bob at trebor.iglou.com
Wed Jul 21 11:35:06 PDT 2004


On Wed, Jul 21, 2004 at 01:09:57PM -0500, Keith F Weatherhead wrote:
| 
| Transpower at aol.com wrote:
| 
| >In a message dated 7/21/2004 1:21:48 PM Eastern Daylight Time, 
| >Fredland at aol.com writes:
| >
| >>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.
| >>
| >>Fred Mindermann
| >>fredland at aol.com
| >
| >
| >
| >Fred:
| >
| >Make a clone of the file (with no records).  Copy non-blank records of 
| >the original file to the clone.  Delete the original file.  Rename the 
| >clone to the original name.
| 
| This is ONLY good if he does not want to preserve Date/Time stamps 
| on the original records, _if that matters to him_?
| 
| I believe Bob Stockler has a program that will allow you to shrink 
| the file AND PRESERVE the Date/Time.  I'm sure he will chime in shortly!

Chiming in . . .

I have a program written in filePro that:

  1 - Works on UNIX, Linux and Windows
  2 - Handles key-only or key+data filePro files
  3 - Moves all inactive and saved-empty records to the end of the file
  4 - Converts saved-empty records to inactive (free)
  5 - Retains all info in the 20-byte record headers
  6 - Can truncate the file if desired (Perl required on non-SCO OS's)

Plus, as a bonus, it can:

  A - Convert a key+data file to key-only
  B - Simply free empty saved records, leaving them in place

It's all automatic, requiring only a filePro file name be entered.

It's share-ware (email me privately for more info).

Bob

-- 
Bob Stockler - bob at trebor.iglou.com
Author: MENU EDIT II - The BEST Creator/Editor/Manager for filePro User Menus.
Fully functional (time-limited) demos available by email request (specify OS).


More information about the Filepro-list mailing list