Save command

Kenneth Brody kenb at fptech.com
Wed May 18 08:11:50 PDT 2011


On 5/18/2011 2:05 AM, flowersoft at compuserve.com wrote:
> -----Original Message-----
> From: Kenneth Brody [mailto:kenb at fptech.com]
[...]
> On 5/17/2011 11:48 AM, flowersoft at compuserve.com wrote:
>>> The record is written to disk as soon as a save is executed or before that
>>> if you do a 'write' in processing.
>
>> No, the record isn't written until processing ends, or an explicit WRITE is
>> executed.
>
> Ken, if that is the case then why doesn't the following code support it?
 >
>      LABEL             D E F I N E   P R O C E S S I N G           5.0.14RN9
[...]
>         Then: rn=@rn
[...]
>         Then: lookup test  r=rn   -np
[...]
> In my system, line #3 is always true when adding records to the 'test' file and as you can see, processing has not ended.

Because that was a bug which was fixed in 5.6.08, which allowed a lookup to 
a still-being-created record to succeed.  The record does not yet exist, yet 
the lookup succeeded.

Add fields test[1] and test[@cd] to the message box, and you will see that 
they are both still blank, because the record is not yet saved.

>>> I don't think a 'free chain' should be run if anyone else is adding records
>>> to the database.  My experience with this is that the free chain never stops
>>> running and the other stations 'hang up' until everyone else stops adding
>>> records to the database.  If a station needs to run a 'free chain' you
>>> should have the other users exit the program.
>
>> The freechain rebuild handles people in the file during the rebuild,
>> including adding records.  I have heard over the years from a few people
>> that the rebuild hangs or gets in an infinite-restart in such a case, but no
>> one has ever gotten me a demonstrable case.
>
> [...]
>
> You want a demonstrable case?
> Take out line 5 of the code above and open the 'test' file in 2 separate windows
> and try to add records on one of the windows while the other has the "Rebuilding Free Chain" up on the screen.

I took out line 5 ("close test"), but it doesn't trigger a freechain 
rebuild.  (This is with dclerk 5.0.12DN9.)

-- 
Kenneth Brody


More information about the Filepro-list mailing list