Aliases and Lookups

Rick Hane yoresoft at hotmail.com
Tue Nov 16 10:41:00 PST 2004


>From: GCC Consulting <gcc at optonline.net>
>Reply-To: rkreiss at gccconsulting.net
>To: 'Rick Hane' <yoresoft at hotmail.com>, kenbrody at bestweb.net
>CC: filepro-list at seaslug.org
>Subject: RE: Aliases and Lookups
>Date: Tue, 16 Nov 2004 10:48:13 -0500
>
>
> > >
> > >Rick Hane wrote:
> > >[...]
> > > > lookups to the bom file and use an alias for each lookup;
> > however if
> > > > I remember correctly the minute I open another lookup to the same
> > > > file
> > >(even
> > > > though it has a unique alias) I will move the pointer in the
> > > > previous
> > >lookup
> > > > to that same file.
> > > >
> > > > First, is my statement above correct and I loose the pointer?  If
> > > > not
> > >then
> > > > no problem.  If it is correct, anyone have thoughts on how to do
> > > > this without setting up and complete levelized bom file
> > for each part?
> > >
> > >While each alias to the same file shares resources, such as the open
> > >file handles and field layout information, they do not share
> > pointer to
> > >the record.  If alias "foo" finds record 123, and then "bar" finds
> > >record 456, alias "foo" continues to point to record 123.
>
>Rick,
>
>Have you considered using array(s) to hold the values you need instead of 
>using
>multiple lookups to the file?  Even if you used multiple lookups, holding 
>the
>values in an array will let you release the looked up record more quickly
>possibly avoiding a record lock situation.
>
>Richard Kreiss
>GCC Consulting

Rich,

Sorry, I should have replied as to the results to the list.  As you can see 
above Ken clarified what happens when using aliases.  I had been mistaken.  
The net result was I built a process which went 7 levels deep in to a bill 
of materials (using nested gosubs).  Not only did it work, it was fast. It 
processed approx 5,000 bills with an average of 200 components each in less 
than 90 seconds.

Our expensive MRP program written in MSSQL takes 2 hours.

Thank you,
Rick Hane
Yore Software
Email: yoresoft at hotmail.com
Deluxe Stitcher Company Inc.
Url:www.deluxestitcher.com
Email: rhane at deluxestitcher.com




More information about the Filepro-list mailing list