Save command

flowersoft at compuserve.com flowersoft at compuserve.com
Tue May 17 23:05:56 PDT 2011


-----Original Message-----
From: Kenneth Brody [mailto:kenb at fptech.com] 
Sent: Tuesday, May 17, 2011 12:25 PM
To: flowersoft at compuserve.com
Cc: filepro-list at lists.celestial.com
Subject: Re: Save command

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
──────────────────────────────────────────────────────────────────────────────
  1  -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -
       ◄ If:
       Then: rn=@rn
  2  -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -
       ◄ If:
       Then: lookup test  r=rn   -np
  3  -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -
       ◄ If: test
       Then: errorbox "Record #"<rn<"Exists"
  4  -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -
       ◄ If: not test
       Then: errorbox "Record #"<rn<"Does NOT Exist"
  5  -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -
       ◄ If:
       Then: close test
  6  -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -
       ◄ If:
       Then: end
  7  -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -
@wlf1  ◄ If:
       Then: escape
  8  -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -
       ◄ If:
       Then: end

In my system, line #3 is always true when adding records to the 'test' file and as you can see, processing has not ended.


>> 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.

-- 
Kenneth Brody



More information about the Filepro-list mailing list