Non-filepro files
Jeff Harrison
jeffaharrison at yahoo.com
Mon Oct 13 19:29:52 PDT 2008
--- On Mon, 10/13/08, Nancy Palmquist <nlp at vss3.com> wrote:
> From: Nancy Palmquist <nlp at vss3.com>
> Subject: Non-filepro files
> To: "filePro List" <filepro-list at lists.celestial.com>
> Date: Monday, October 13, 2008, 3:22 PM
> Fellow FilePro experts,
>
> I have a non-filepro file that is used to collect changed
> records and only
> writes free records, each night the file is reset and
> starts collecting changes
> for the next day.
>
> I am wondering how the filePro locking is managed for a
> non-filepro kind of file.
>
> lookup file r=free -n
> or to lock a free record do you have to add the -p
>
> lookup file r=free -np
>
> Two processes are writing records to this file and I think
> I noticed that a
> record here and there are missing, seemingly written over
> by another process.
>
> Both the processes were using -n without the -p for
> locking. I always
> understood that r=free was automatically locking, but now I
> wonder if
> non-filepro Files are different somehow.
>
> I noticed that in other cases where I have not noticed any
> lost records, I was
> using -np on the lookup FREE.
>
> Many, many records are written to this file from many
> processes. I am concerned
> I am really missing more data than I am noticing.
>
> (This is data that is not lost it just slows down the cycle
> when it is not
> written to this temporary change file. I want to get all
> the new data and post
> it to the web as it is received. Each night the entire file
> is refreshed, but
> this gets the data added all day so it is not 24 hours
> old.)
>
> I am expecting a record for each order processed and
> noticed I miss a few
> everyday, that did all the other things it should have but
> there is not a record
> in this file. Nothing crashed, nothing is broken, it just
> looks like a record
> was written over the record by another process.
>
> Any thoughts would be useful.
>
> Someone is going to ask me what OS is writing this file and
> here is the answer,
> both Linux and Windows write records into this file. That
> is why I used
> NON-filepro format. There are no indexes. The data part
> of the file is in a
> folder that is shared by both systems. It works great as a
> way to pass data
> between the systems. The only reason I noticed is that I
> run a process on this
> one shared file that marks off orders to indicate they were
> processed on the
> other platform. I noticed a few are not marked off and
> wondered why.
>
>
> Nancy
> --
I had asked this same question a while back, and Ken's answer was that you do not need to add a -p to a free record lookup. Filepro automatically locks the record.
No doubt the problem relates to the way you are sharing the file between two systems - whatever you are using is not respecting the lock I would guess.
Jeff Harrison
jeffaharrison at yahoo.com
More information about the Filepro-list
mailing list