After all my advice, I do agree with Jeff that doing selects within I-desc 
creates a LOT of overhead and in general, is not a good idea.  If you can get 
around this and put it all in one piece of code, you will get better results.  
I was assuming you had a reason for doing it the way you described.

John Israel
Sr. Programmer/Analyst
Dayton Superior Corporation
721 Richard St.
Dayton, OH  45342
937-866-0711 x44380

-----Original Message-----
From: [email protected] 
[mailto:[email protected]] On Behalf Of Jeff Butera
Sent: Friday, April 24, 2009 10:01 AM
To: [email protected]
Subject: Re: [U2] I-descriptor subroutine / SELECT question

John wrote:
> Hi all,
>
> I was asked to create an I-descriptor friendly wrapper subroutine for a
> subroutine that has one input argument and 10 outputs.  Turns out this
> subroutine calls another subroutine that executes a select (against a
> different file).
>
> Active select -> LIST FILE-1 I-DESC -> I-DESC calls wrapper -> wrapper
> calls subroutine -> called subroutine tries to execute select against
> FILE-2.
>
> Is there any way to get around the active select so the query against
> FILE-2 works correctly?

John - the solution provided by David will work.  

However, I've got to say that I cringe whenver someone proposes using an 
I-decriptor that, in turn, is performing it's own SELECT under the hood.  
This is really poor from both a design and performance point of view - 
there's got to be a more methodical means to get the data you need.

For example, if your I-desc "XYZ.MONEY" is in the PERSON file and in turn 
performs a SELECT against the MONEY file and each has 1000 records, this:

SELECT PERSON WITH XYZ.MONEY > 1000.00

is going to execute 1,000,000 SELECTs to obtain it's results.

I do a lot with stored computed columns (ahem: I-desc), many of which are 
calculated in realtime using triggers.  Combined with indexing these stored 
values, queries take less than a second.



-- 
Jeff Butera, Ph.D.
Administrative Systems
Hampshire College
[email protected]
413-559-5556

"Dad, you're talking in grown-up and need to stop."
                 Catherine Butera
-------
u2-users mailing list
[email protected]
To unsubscribe please visit http://listserver.u2ug.org/
-------
u2-users mailing list
[email protected]
To unsubscribe please visit http://listserver.u2ug.org/

Reply via email to