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/

Reply via email to