Alaska Software Inc. - Technique to build complicated filters, con't
Username: Password:
AuthorTopic: Technique to build complicated filters, con't
Bruce AndersonTechnique to build complicated filters, con't
on Thu, 15 Jun 2006 09:37:45 -0500
Phil Ide
Re: Technique to build complicated filters, con't
on Thu, 15 Jun 2006 22:27:58 +0100
Bruce,

> What I finally realized is that this is a valid codeblock:
>     bOrBlock := {|| eval(bBlock1) .or. eval(bBlock2)}
> This is the way to insert a logical OR test.  The scales have fallen from my eyes.

ROFL - welcome apostate, you have journeyed far in your search for
enlightenment. The path to Nivana is close. Just follow that dirt track
around that lumpy hill, across the humpy-back bridge and onwards towards the
burning sunset. When you come across a yellow-brick road...

Regards,

Phil Ide

-----------------------------------------------------------------
xbHCL (http://www.xbHCL.com)     Xbase++ HTML command layer
PBIH  (http://www.pbih.eu)       Polar Bear International Hosting
-----------------------------------------------------------------
Xbase++ FAQ, Libraries and Sources:
http://www.idep.org.uk/xbase

A fool and his money soon become a sysop!
Bruce AndersonRe: Technique to build complicated filters, con't
on Fri, 16 Jun 2006 08:24:18 -0500
Laugh if you must.  Of course, these codeblocks are strings built by the 
user and macro compiled at runtime.  In a WAA app, this mechanism runs 
through a table of 150K+ records, finding the handful of records that match 
a complicated filter and building the PDF report in less than one second. 
I used to rely on Andy Grove to make me look smarter; now, I can do it 
myself.
Phil Ide
Re: Technique to build complicated filters, con't
on Fri, 16 Jun 2006 17:04:43 +0100
Bruce,

> Laugh if you must.  Of course, these codeblocks are strings built by the 
> user and macro compiled at runtime.  In a WAA app, this mechanism runs 
> through a table of 150K+ records, finding the handful of records that match 
> a complicated filter and building the PDF report in less than one second. 
> I used to rely on Andy Grove to make me look smarter; now, I can do it 
> myself.

Laugh? Never - I was just enjoying your moment of triumph!

Regards,

Phil Ide

-----------------------------------------------------------------
xbHCL (http://www.xbHCL.com)     Xbase++ HTML command layer
PBIH  (http://www.pbih.eu)       Polar Bear International Hosting
-----------------------------------------------------------------
Xbase++ FAQ, Libraries and Sources:
http://www.idep.org.uk/xbase

Unable to locate Pepsi -- Operator Halted!
edimail3@news2.nmsc.govRe: Technique to build complicated filters, con't
on Fri, 16 Jun 2006 12:06:58 -0400
Are you saying that you are able to skip() 150k records in under 1 second?

If so, how are you doing that?  No indexes?  Local databases only?



"Bruce Anderson" <banderson@graphical-db.com> wrote in message 
news:30d434e0$cb15494$2482@news.alaska-software.com...
> Laugh if you must.  Of course, these codeblocks are strings built by the 
> user and macro compiled at runtime.  In a WAA app, this mechanism runs 
> through a table of 150K+ records, finding the handful of records that 
> match a complicated filter and building the PDF report in less than one 
> second. I used to rely on Andy Grove to make me look smarter; now, I can 
> do it myself.
>
Bruce AndersonRe: Technique to build complicated filters, con't
on Fri, 16 Jun 2006 15:01:29 -0500
Indexes: Yes, several fields are indexed in the file, but that is immaterial 
for the reports.  The application is a database of customers and their 
transactions on a special video fiber optics network.  The network produces 
1,000+ transactions per day.  The reports pull transaction records, 
organizes them, and totals some cost fields.  I got through the table once, 
applying the filter conditions individually and sequetially, based on 
testing the most restrictive condition first, and drop the record when a 
test fails.

Reports typically are date bounded and always have date as a suborder in the 
report presentation, so the TRANSACTIONS file is initially ordered by date. 
When there is a beginning date value, I do an initial softseek on it. I 
build an array of transaction key values during the filtering step, sort the 
array by other criteria, and then build the report seeking on the key values 
in the array.  0.99 seconds start to finish according to the WAA log, 
finding 47 records out of 152K for a one month period report.  Same report 
with no beginning or ending date, which means it does look at all records in 
the dbf is 7.44 seconds and 76 records.  This is a case where there are 10 - 
15 acceptable values in a field which has 100 possible values, and a similar 
situation in a second field.  If a match is made in either field the record 
is included (this is the OR test I was discussing).
Roger DonnayRe: Technique to build complicated filters, con't
on Fri, 16 Jun 2006 06:33:29 -0600
Eval( {|b|Eval(b,{||Msgbox('hi Bruce')})}, {|b|Eval(b)} )
Phil Ide
Re: Technique to build complicated filters, con't
on Fri, 16 Jun 2006 17:06:32 +0100
Roger,

> Eval( {|b|Eval(b,{||Msgbox('hi Bruce')})}, {|b|Eval(b)} )

Nooooooo! It does my head in!

Try following THAT in the debugger 

p.s. did you get my email?

Regards,

Phil Ide

-----------------------------------------------------------------
xbHCL (http://www.xbHCL.com)     Xbase++ HTML command layer
PBIH  (http://www.pbih.eu)       Polar Bear International Hosting
-----------------------------------------------------------------
Xbase++ FAQ, Libraries and Sources:
http://www.idep.org.uk/xbase

If it ain't broke, wait a day or two!!
Roger DonnayRe: Technique to build complicated filters, con't
on Fri, 16 Jun 2006 10:24:23 -0600
I wanted to see how convuluted a code block I could create.

Yes, I got your email about xbHCL and I really want to start using it when I 
get back from this project I'm on in NYC.

Next week.

"Phil Ide" <phil@pbih.net> wrote in message 
news:1o0xadh6wvw66.dlg@pbih.net...
> Roger,
>
>> Eval( {|b|Eval(b,{||Msgbox('hi Bruce')})}, {|b|Eval(b)} )
>
> Nooooooo! It does my head in!
>
> Try following THAT in the debugger 
>
> p.s. did you get my email?
>
> Regards,
> -- 
> Phil Ide
>
> -----------------------------------------------------------------
> xbHCL (http://www.xbHCL.com)     Xbase++ HTML command layer
> PBIH  (http://www.pbih.eu)       Polar Bear International Hosting
> -----------------------------------------------------------------
> Xbase++ FAQ, Libraries and Sources:
> http://www.idep.org.uk/xbase
>
> If it ain't broke, wait a day or two!!
Phil Ide
Re: Technique to build complicated filters, con't
on Fri, 16 Jun 2006 23:03:02 +0100
Roger,

> I wanted to see how convuluted a code block I could create.

Well, I think that one gets into the Arcane Wizardry Hall of Fame 

> Yes, I got your email about xbHCL and I really want to start using it when I 
> get back from this project I'm on in NYC.

Well, you take it easy and have fun, I want you nice and healthy for the
next devcon 

Regards,

Phil Ide

-----------------------------------------------------------------
xbHCL (http://www.xbHCL.com)     Xbase++ HTML command layer
PBIH  (http://www.pbih.eu)       Polar Bear International Hosting
-----------------------------------------------------------------
Xbase++ FAQ, Libraries and Sources:
http://www.idep.org.uk/xbase

Co-sysop wanted: Must have good oral skills