variables losing value on current file aliased lookup

Richard Kreiss rkreiss at verizon.net
Tue Apr 20 10:54:39 PDT 2010


John,

This is how I did it from the beginning.  I have a control file I use for
this purpose which has just the number of records for each person accessing
the system.  The reason I did this was simple, I never realized that I could
so this type of processing while not standing on a record.

In fact, my original programming got the user name, did a lookup to a user
master file for the re3cord # to use.

Richard Kreiss

> -----Original Message-----
> From: filepro-list-bounces+rkreiss=verizon.net at lists.celestial.com
[mailto:filepro-list-
> bounces+rkreiss=verizon.net at lists.celestial.com] On Behalf Of John Esak
> Sent: Tuesday, April 20, 2010 12:55 PM
> To: filepro-list at lists.celestial.com
> Subject: RE: variables losing value on current file aliased lookup
> 
> Oh, oh, oh.... Now I remember... This is because of the non-lookup dash
> thing.  My new way of getting a free record in the current file, storing
its
> record number in a variable and then doing a lookup dash to that record to
> stand on it and do processing bypasses this problem in any case.  However,
I
> have only started it about two years ago.  But now that you bring up the
> non-dash thing I do remember the fix.
> 
> John
> 
> 
> > -----Original Message-----
> > From: filepro-list-bounces+john=valar.com at lists.celestial.com
> > [mailto:filepro-list-bounces+john=valar.com at lists.celestial.co
> m] On Behalf Of Kenneth Brody
> > Sent: Tuesday, April 20, 2010 12:43 PM
> > To: Bruce Easton
> > Cc: filepro-list at lists.celestial.com
> > Subject: Re: variables losing value on current file aliased lookup
> >
> > On 4/20/2010 11:18 AM, Bruce Easton wrote:
> > > Below I show some code along with comments below that to
> > explain some
> > > unexpected runtime results.     (filepro 5.0.14 - Linux)
> > > The code is invoked with clerk from the file "control".
> > [...]
> > >            Then: declare GLOBAL targdir(20,*)
> > [...]
> > [...]
> > > The debugger shows that the value of "targdir" is retained
> > until line
> > > 150, and
> > > that as soon as the lookup on line 150 is executed
> > (successfully) the
> > > values of
> > > "tardir", and other variables, are cleared.    I don't usually use a
> > [...]
> > > Is this behavior expected?
> >
> > This was fixed long ago.
> >
> > Quoting the 5.0.15 and 5.6 beta readme files:
> >
> > (All) #783
> >
> >      A non-dash lookup to the main file may clear non-",g" DECLAREd
> >      variables.  (See also #785.)
> >
> > --
> > Kenneth Brody
> > _______________________________________________
> > Filepro-list mailing list
> > Filepro-list at lists.celestial.com
> > http://mailman.celestial.com/mailman/listinfo/filepro-list
> >
> 
> _______________________________________________
> Filepro-list mailing list
> Filepro-list at lists.celestial.com
> http://mailman.celestial.com/mailman/listinfo/filepro-list




More information about the Filepro-list mailing list