WRITEing to the main (-) file without unlocking LOOKUP's.
John Esak
john at valar.com
Sun Jun 13 18:55:50 PDT 2004
> -----Original Message-----
> From: Jerry Rains [mailto:jmrains at peoplepc.com]
> Sent: Sunday, June 13, 2004 6:32 PM
> To: john at valar.com
> Subject: Re: WRITEing to the main (-) file without unlocking LOOKUP's.
>
>
> On Friday 11 June 2004 19:21, John Esak wrote:
> > You haven't given quite enough inromation. If you are in
> *clerk... run the
> > process from @entsel and do a lookup to the current record (main file).
> > Then write that alias.
> >
> > If you are in *report that is another matter. I don't think there is a
> > way... but may I ask what the need is? Why would "writing" the open
> > lookups be detrimental? If you do a generic WRITE to update the current
> > file and have not changed anything in the open lookups, those files will
> > not be changed... unless you care that the timestamp of the key
> file will
> > be modified. (and possibly, not sure, used index for that record.)
>
> John,
>
> It is a *clerk process. The file is an old one of Chuck Mullen's that is
> pretty complex that I have been updating to meet the needs of All
> American
> Moving. It has lots of CALLed tables (23 if I remember right)
> and I haven't
> analysed them all yet, but I suspect that some may be *report based.
>
> Chuck used a WRITE before displaying a browse lookup of all of
> the various
> forms that can be printed and processes (such as posting) that
> can be done
> and at several other places in the input process table.
>
> The main problem is I want to keep an Audit Trail of any changes
> to one of the
> LOOKUP files. I normally use a secondary LOOKUP to get the
> original values
> for this but the WRITE kept me from being able to tell that a
> field changed.
> I had addressed this problem by filling a non-mapped array with
> the contents
> of the LOOKUP file when I first enter UPDATE mode, however things were
> getting complcated so yesterday I pulled the WRITE commands to
> see if this
> causes a problem with any of the CALLed processes. So far I
> haven't seen any
> problems but I haven't finished testing this yet.
>
> If it turns out that some of the CALLed processes need a WRITE to
> work right
> and if I could do a WRITE just to the main (-) file without
> writing to the
> LOOKUP files I could do the various CALLed processes and then if
> I needed to
> bail I could restore the original values from a saved array and
> not have to
> worry about changes made to LOOKUP files.
>
> I hope this made sense to you.
>
> Jerry
> >
> > John Esak
> >
> > Visit The FP Room www.tinyurl.com/yuag7 24/7
> >
> >
> > -----Original Message-----
> > From: filepro-list-bounces at lists.celestial.com
> > [mailto:filepro-list-bounces at lists.celestial.com]On Behalf Of
> Jerry Rains
> > Sent: Friday, June 11, 2004 6:40 PM
> > To: filepro-list at seaslug.org
> > Subject: WRITEing to the main (-) file without unlocking LOOKUP's.
> >
> >
> > Does anyone know how to WRITE just the main file without
> unlocking open
> > LOOKUP's?
> >
> > This process runs in the 'gblrate' table. I tried 'WRITE -'
> and 'WRITE
> > gblrate' but fP didn't like either. I checked fP help, the fPmanual and
> > Stuart's book.
> >
> > Jerry Rains
Yes, sort of makes sense, it sounds like you're trying to keep the ability
to put the record back to ground zero if the user breaks out, etc. I would
switch all the generic WRITES to WRITE Filename... Also, maybe implementing
a "clone" routine for each lookup file, and more importantly for the main
file. At least you can tell if something is updated. (clone file means about
what you are doing... except the stored array is written to a file when
differences between it and the original values are found. Maybe there is no
reason for the WRITE's in the first place.
John
More information about the Filepro-list
mailing list