Create new T)ranslate ATB's in Y.INFO to lookup the data in X.INFO, and just do the query directly from Y.INFO? One thing that's common in this situation is to have an xref file where the key is PACKET.ID and attribute 1 is a multivalued list of keys for Y.INFO. If this is a packaged app, you may not have that luxury though ;-)
E.g. in Y.INFO, :AE DICT Y.INFO X.STATUS I OCONV(PACKET.ID,"TX.INFO;X;19;19") -- use the right field position of course :AE DICT Y.INFO X.DOB I OCONV(PACKET.INFO,"X.INFO;X;22;22") :SORT Y.INFO WITH X.STATUS = "ccc" BILL.DAY BILL.AMT X.DOB Etc.? -----Original Message----- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Hilk, Brandon Sent: Wednesday, August 28, 2013 8:07 AM To: U2 Users List Subject: Re: [U2] Select from one file with save-list from another file Thanks everyone, I've got some usable info to work with. Sorry if my original post was a bit vague, let me illustrate to clarify: X.INFO @................PACKET.ID.........NAME..........DOB...........STATUS 52781456.........52781456..........DOE, JOHN.....06-17-1985....CCC Y.INFO @................BILL.DAY..........BILL.AMT......TYPE..........PACKET.ID 52781456*MPA*2...08/28/2013........50............MPA...........52781456 Hopefully showing a rough table structure helps me better convey what I was trying to do. Using criteria in X.INFO to create a selection list and then using that list to select and export information from Y.INFO like BILL.DAY and BILL.AMT that wasn't available in X.INFO. Since a select list made from X.INFO would have different record ID's, it wouldn't be able to be used to select from Y.INFO. Hence, me looking for some trickery to use Y.INFO's PACKET.ID field as the array for the select list to work against. Brandon -----Original Message----- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On 8/27/2013 1:24 PM, Hilk, Brandon wrote: > Hello! > > > > UniVerse 10.1, HP/UX, Pick. > > > > Is there a way I can build a save-list from a selection from one file > X.INFO (where the record ID is an 8 digit number) and use that list to > select from file Y.INFO (where that 8 digit number is not the record ID > but does exist as a "foreign key" elsewhere in the file). In SQL this > would be considered a join and would look something like this: > > > > select * > > from X.INFO, Y.INFO > > where X.INFO.packet.id=Y.INFO.packet.id > > and X.INFO.status='ccc'; > > > > I can run this in TCL and have it return the results I want but can't > build a save-list from it because I don't know the UniVerse/SQL syntax > to do so. > > > > So to summarize, is there a way to use a save-list built from X.INFO to > make another save-list comprised of the record ID's from Y.INFO? > > > > Thanks for any advice you can give. > > > > _______________________________________________ > U2-Users mailing list > U2-Users@listserver.u2ug.org > http://listserver.u2ug.org/mailman/listinfo/u2-users > _______________________________________________ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users _______________________________________________ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ----------------------------------------- IMPORTANT NOTICE: This message is intended only for the addressee and may contain confidential, privileged information. If you are not the intended recipient, you may not use, copy or disclose any information contained in the message. If you have received this message in error, please notify the sender by reply e-mail and delete the message. _______________________________________________ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users