free records vs deleted records
Brian K. White
brian at aljex.com
Fri Aug 2 16:36:44 PDT 2013
On 8/2/2013 6:43 PM, Fairlight wrote:
> Assume one does a lookup for a free record, and it succeeds. Further
> assume that one does not ever issue a "write lookupname" command.
>
> Does the record actually get written by default, even with blank records?
> I see blank ones showing up in the keys, but I'm unsure as to how to find
> out if it's considered "taken/used", or flagged as "deleted" and available
> for reuse in the freechain.
>
> I'd appreciate insight into this vagary. Thanks!
>
> mark->
>
A record is physically created, with empty fields, not marked deleted,
right when you lookup free or when you enter a file in add records mode.
A write will update the empty records with the current data.
End, exit, close, will all do a write automatically on the way out.
So, if you want to lookup to a free record and then exit without leaving
a new blank record behind, (that nothing else will ever touch again
since it will never match any normal lookups etc, and it's not marked
deleted so it won't get used as a new free record) you have to actively
delete it with a delete command. If you're standing on a new record from
a "lookup - r=free", or from entering via add records mode, then you can
just say delete. If it's a lookup to another file then it's "delete
aliasname" or "delete filename" if you didn't use an alias.
It will still be there taking up space on the disk, but it will be
marked deleted, and the next lookup free will use IT instead of growing
a new one. So if you have a process that does this many times over, it
will just reuse the same single record over and over instead of creating
infinite new ones.
--
bkw
More information about the Filepro-list
mailing list