Scott, Well, I suppose sometimes it would. But I was aiming at a general solution. For example, suppose CUST.NAME is stored in a CUSTOMER file. And CUST.ID is an attribute in any number of files, such as ORDERS, INVOICES, CONTRACTS, SALESMAN, etc...
Would you want to maintain 4 separate multivalued attributes in CUSTOMER to track all ORDERS, INVOICES, CONTRACTS, SALESMAN, etc. ids? The technique I described would work if CUSTOMER CUST.NAME were indexed and the CUST.ID field of any or all of those supposed files were also indexed. One can think of numerous other examples. And sometimes creating an index is easier than retrofitting the file with new attributes and reworking the ap to maintain the mv-list. But even in the simple ORD.HDR/ORD.DTL example, the simplicity is debateable. Historically, I know that old Pickies do it the way you described, but I'd sooner let the system maintain the list (via indexing ODR.DTL HDR.ID) rather than explicitly maintaining the relationship programmatically. Admittedly, it shifts what's simple and what's complex. But some of us old Primates have used indexes for about a decade and a half, so we're comfortable with that. I also have a general-purpose I-descriptor subroutine that I use for doing SELECTINDEX from RetrieVe/UniQuery. It yields the same MV-list of ORD.DTL ids that you would maintain as an mv attribute, but via an I- or V-descriptor. Another complexity you might think, but once the general-purpose utility subroutine is written, the simplicity at the higher level is restored. That's how I see it anyway, cds -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Scott Ballinger Sent: Thursday, November 04, 2004 2:18 PM To: [EMAIL PROTECTED] Subject: RE: [U2] Index problem Wouldn't it be simpler to... 1. Maintain an attribute in dict ORD.HDR that contains all of the related ORD.DTL ids (or an I-type that builds such a list), perhaps called ORD.DTL.IDS 2. SELECT ORD.HDR WITH CUST.NAME EQ "ABC" "XYZ" ORD.DTL.IDS Scott Ballinger Pareto Corporation Edmonds WA USA 206 713 6006 -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Stevenson, Charles Sent: Thursday, November 04, 2004 12:44 PM To: [EMAIL PROTECTED] Subject: RE: [U2] Index problem [snip] Then 2 steps at TCL or pararaph: >SELECT ORD.HDR WITH CUST.NAME = "XYZ" "ABC" etc... >>XSELECT ORD.DTL HDR.ID XSELECT takes an active select list of ORD.HDR IDs and essentially does: DTL.LIST = '' LOOP WHILE READNEXT HDR.ID FROM 0 SELECTINDEX 'HDR.ID', HDR.ID FROM DTL.FVAR TO 10 READLIST TEMP.LIST FROM 10 DTL.LIST<-1> = TEMP.LIST REPEAT FORMLIST DTL.LIST TO 0 STOP ending with an active select list of all ORD.DTL ids that have CUST.NAME resolved to "XYZ" or "ABC". It is fast. ------- 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/