Noah,
Not directly, but *if* File2 is indexed by its FILE1_ID attribute there
are a couple ways.
> Assume that I have 2 files, such as customer and invoice
>
> File1: has 1 attribute, ID
> File2: has 2 attributes, ID and FILE1_ID
>
> I have a savedlist with ID numbers from file1.
>
> I want to select all records in file2 which have FILE1_ID
> matching the savedlist I already have.
>
> Is this possible?
1. In basic, something like:
OPEN 'File2' to F2.FVAR
GETLIST [list of File1 IDs]
F2ID.LIST = ''
LOOP WHILE READNEXT F1.ID
SELECTINDEX 'FILE1_ID', F1.ID FROM F2.FVAR TO 10
READLIST SUBLIST FROM 10 THEN F2ID.LIST<-1> = SUBLIST
REPEAT
Now F2ID.LIST has what you want.
I'll leave it to you to come up with variations on the theme that suits
you.
My own generic solution is a utility XSELECT verb (with "K"eep active
flag in VOC<4>) which takes an active select list of indexed values and
generates an active list of corresponding primary ids.
In this case:
>GET.LIST [list of File1 IDs]
>>XSELECT File2 FILE1_ID
I wish UV had that verb out of the box.
2. QSELECT, if 1st you set up a voc pointer to the normally hidden
type-25 I_File2/INDEX.nnn file (let's call it FILE1.FIE2.IDX in the VOC)
:
>GET.LIST [list of File1 IDs]
>>QSELECT FILE1.FILE2.IDX
Chuck Stevenson
-------
u2-users mailing list
[email protected]
To unsubscribe please visit http://listserver.u2ug.org/