> Charles:
> 
> And some complain about the obtuse nature of "F" correlatives.  :-) 
> 
> Bill

*Sigh*
Yes, Bill, point taken.

BUT!  this is quicker to write and probably quicker in execution than
most (all?) suggestions so far.
I forgot to mention that because the target for TRANS() stays constant
through the entire execution, the record is read only once & subsequent
references are very cheap.

When it comes to MV-handling, it's the ol' Power vs Simplicity
trade-off.
Because I-descriptors work on entire dynamic arrays, MV-handling can be
more difficult looking, with all those mv-handling subroutines like EQS,
IFS, REUSE(), etc..  
Correlatives are designed to just specifiy how to act on a single value.
For multiple values, its up to the query engine to repeatedly feed the
next value to the correlative.


I'll write a detailed explanation of the current example:

   TRANS(ctrlfile,ctrlid,-1,'X');EQS(@,REUSE(fld.in.question))

if anyone asks.

cds

 
> From: Stevenson, Charles
> 
> Don't know about UD limits.  Here's a workaround:
> 
> Write a control record with the 251 different numbers that 
> you are searching for.
> Then
>    SELECT file WITH EVAL "SUBR( '!EQS', TRANS( controlfile, 
> controlid, -1, 'X' ), REUSE( field.in.question ))" = "1"
> 
> Something close to that, anyway.
> It loops through the entire file once (the expensive part), 
> and does 251 comparisons for each record (not so sepenseive).
> 
> cds
-------
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/

Reply via email to