Re: [U2] Select from one file with save-list from another file

2013-08-27 Thread Charles Stevenson
I'm with Ian. Maybe Ian and I don't understand the question. The other answers seem so complicated. Brandon, Replace Ian's example "Y.PACKET.ID" with whatever is thereal name in DICT X.INFO pointing to what you describa ase Y.INFO's key exists as a "foreign key" somewhere in X.INFO. Giv

Re: [U2] universe 11.1 triggers via indexing and @IDX.IOTYPE sample

2013-08-27 Thread Charles Stevenson
Thanks, Troy. I was going to write that after I got to 11.1. (The upgrade was scheduled for Q3, but I hear rumours it got bumped because salesmen just sold something we can't do - yet. It pays the bills.) Troy, I want to borrow your code, but I want to include proper attribution in the progr

Re: [U2] Select from one file with save-list from another file

2013-08-27 Thread Allen Elwood (TW)
i like temp files properly sized, temp dicts, one simple statement invoking RSELECT, no possibility of syntax goofs simple easy fun On 8/27/2013 5:37 PM, Wjhonson wrote: Are you implying that it somehow reads the permissions of the dictionary before allowing the use of EVAL?

Re: [U2] Select from one file with save-list from another file

2013-08-27 Thread Richard Lewis
Yes, because (at least on UV) it actually writes a temporary record to the dictionary to perform the EVAL expression. On Tue, Aug 27, 2013 at 6:37 PM, Wjhonson wrote: > Are you implying that it somehow reads the permissions of the dictionary > before allowing the use of EVAL? > > __

Re: [U2] Select from one file with save-list from another file

2013-08-27 Thread Wjhonson
Are you implying that it somehow reads the permissions of the dictionary before allowing the use of EVAL? -Original Message- From: Wols Lists To: u2-users Sent: Tue, Aug 27, 2013 5:30 pm Subject: Re: [U2] Select from one file with save-list from another file On 28/08/13 01:2

Re: [U2] Select from one file with save-list from another file

2013-08-27 Thread Wols Lists
On 28/08/13 01:20, Wjhonson wrote: > Yes I think you could use an On The Fly statement like the EVAL to do the > trans if you can't actually mod the dictionary > OOPS!!! I know this is UD, but in UV you couldn't do "on the fly" like EVAL if you couldn't mod the dictionary. Whether that was a se

Re: [U2] Select from one file with save-list from another file

2013-08-27 Thread Allen Elwood (TW)
forgot to mention, david green knows a way of doing this with some fancy statements, i'm sure he'll chime in when he sees the thread, so don't give up hope yet brandon! On 8/27/2013 5:06 PM, Allen Elwood (TW) wrote: that's basically what my program does on the fly, see fourth gosub GOSUB

Re: [U2] Select from one file with save-list from another file

2013-08-27 Thread Wjhonson
Yes I think you could use an On The Fly statement like the EVAL to do the trans if you can't actually mod the dictionary -Original Message- From: Allen Elwood (TW) To: U2 Users List Sent: Tue, Aug 27, 2013 5:13 pm Subject: Re: [U2] Select from one file with save-list from anoth

Re: [U2] Select from one file with save-list from another file

2013-08-27 Thread Allen Elwood (TW)
that's basically what my program does on the fly, see fourth gosub GOSUB GET.OPTIONS GOSUB DETERMINE.TEMP.FILESIZE GOSUB LOAD.TEMP.FILE GOSUB CREATE.TEMP.DICT GOSUB BUILD.LIST2 GOSUB FINISH.UP On 8/27/2013 4:03 PM, Wjhonson wrote: It seems to me that the easiest way to create a "lis

Re: [U2] Select from one file with save-list from another file

2013-08-27 Thread Wjhonson
It seems to me that the easiest way to create a "list of orders where the customers state is Arizona" is to first create a translation FROM the Order file INTO the Customer file which will return the customers state and then just select on that new dictionary entry -Original Messag

Re: [U2] Select from one file with save-list from another file

2013-08-27 Thread Rick Nuckolls
Your response supposes that the ORDER.ID IS is in the CUSTOMERS file/table, which is not the criteria of the original problem. The problem presented is a bit difficult to work around in RETRIEVE, and even harder if you are restricted to not programming, as Brandon evidently is. We wrote a utili

Re: [U2] Select from one file with save-list from another file

2013-08-27 Thread McGowan, Ian
At least on Unidata you can put the foreign key in the select statement, and that's the id that will be used: #SELECT X WITH STATUS = "ccc" Y.PACKET.ID #SAVE.LIST L1 #GET.LIST L1 #LIST Y If you put two atb names in the select, they are interleaved in the resulting saved list, which can be a qui

Re: [U2] Select from one file with save-list from another file

2013-08-27 Thread Jo Lester
SELECT CUSTOMERS WITH STATE = 'AZ' SAVING ORDER.ID LIST ORDERS > From: r...@lynden.com > To: u2-users@listserver.u2ug.org > Date: Tue, 27 Aug 2013 14:42:34 -0700 > Subject: Re: [U2] Select from one file with save-list from another file > > I found an old example on line that might get you starte

Re: [U2] Select from one file with save-list from another file

2013-08-27 Thread Rick Nuckolls
I found an old example on line that might get you started SELECT TO SLIST 0 FROM CUSTOMERS WHERE STATE = 'AZ'; SAVE.LIST CUSTOMER.LIST SELECT * FROM ORDERS WHERE CUSTOMER.ID IN (SELECT EVAL " RECORD" FROM &SAVEDLISTS& 'CUSTOMER.LIST'); The extra syntax that might help is SELECT TO SLIST FROM

Re: [U2] Select from one file with save-list from another file

2013-08-27 Thread Hilk, Brandon
Very nifty Allen, thank you! Unfortunately, I'm a mere user in my organization and not a programmer, so I don't have UniVerse permissions to compile programs or even run the editor. *sigh* Alas. I hope someone else is able to utilize your program. -Original Message- From: u2-users-boun..

Re: [U2] Select from one file with save-list from another file

2013-08-27 Thread Allen Elwood (TW)
i made a relational selection program many many moons ago - i'm retired now - thanks to a crushed right hand i can only type with the left hand which goes numb quickly thanks to an elbow injury but i keep the code around and lurk on the list just in case :-) * RSELECT - Relational File Selec

[U2] Select from one file with save-list from another file

2013-08-27 Thread Hilk, Brandon
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" elsewher

Re: [U2] universe 11.1 triggers via indexing and @IDX.IOTYPE sample

2013-08-27 Thread Buss, Troy (Contractor, Logitek Systems)
Phil, Ahh, good catch, I believe you are correct. Thankfully, this should be a very very rare occurrence. Thanks! Should be: 0073 IF DATE.NOW # DATE() AND TIME() < TIME.NOW THEN DATE.NOW = DATE() -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun

Re: [U2] universe 11.1 triggers via indexing and @IDX.IOTYPE sample

2013-08-27 Thread Phil Walker
Should line 73 of your program be < rather than > for the time as when the date has changed, the time will be less than the time of the date - 1 which you have just set. 0068 DATE.NOW = DATE() 0069 TIME.NOW = TIME() 0073 IF DATE.NOW # DATE() AND TIME() > TIME.NOW THEN DATE.NOW = DATE()

Re: [U2] UDT 7.1 Indexing question

2013-08-27 Thread Lunt, Bruce
I will tweak my select to look for just the 3 periods that I want and see if that helps. Thanks for the help. -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Wjhonson Sent: Tuesday, August 27, 2013 11:04 AM To: u2-u

Re: [U2] UDT 7.1 Indexing question

2013-08-27 Thread Wjhonson
So if each one has at most five multi-values, and you want the more recent three, you will be selecting at a minimum 60% of the file's entries. For that purposes an index is the *wrong* structure to use :) The most efficient search is strictly linear... group order. So just a simple SSELECT..

Re: [U2] UDT 7.1 Indexing question

2013-08-27 Thread Kevin King
Dave's right, if you can look for a specific value (or values with "x""y""z") you'll get significantly faster speed than with with BY.EXP. You can then use a LOCATE(..) in BASIC to figure out which rows are to be included on the report. On Tue, Aug 27, 2013 at 11:58 AM, Lunt, Bruce wrote: > Ea

Re: [U2] UDT 7.1 Indexing question

2013-08-27 Thread Lunt, Bruce
Each record has 2-5 multi-values that are date periods. I am looking for the most recent 3 periods. There are over a million records so the BY-EXP gives me 3 million values to process. I thought about writing a work file with the values in a separate record but the size seems like it would take

Re: [U2] UDT 7.1 Indexing question

2013-08-27 Thread Dave Davis
It really depends on the percentage of records that contain the value you are looking for - multivalued or not I think if you include a criteria like: WITH mv_indexed_field = "value" it will be faster than without the index. However, if most of the records in the file have that value it won't

Re: [U2] UDT 7.1 Indexing question

2013-08-27 Thread Lunt, Bruce
That's what I was afraid of. I have a large file and I was looking for some way to speed up a report that I am creating with Uniquery. -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Kevin King Sent: Tuesday, August

Re: [U2] UDT 7.1 Indexing question

2013-08-27 Thread Kevin King
My guess is that it shouldn't matter. Each multivalue in a list gets a separate index entry. On Tue, Aug 27, 2013 at 10:46 AM, Lunt, Bruce wrote: > Hi All, > > Will indexing a field that I retrieve with BY-EXP be faster than an > un-indexed field? > > Thanks, > Bruce >

[U2] UDT 7.1 Indexing question

2013-08-27 Thread Lunt, Bruce
Hi All, Will indexing a field that I retrieve with BY-EXP be faster than an un-indexed field? Thanks, Bruce ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users

Re: [U2] universe 11.1 triggers via indexing and @IDX.IOTYPE sample

2013-08-27 Thread Perry Taylor
That is awesome information Troy! Thanks for that! (Now if I could just get my production environment upgrade to 11.1x :D ) -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Buss, Troy (Contractor, Logitek Systems)

[U2] universe 11.1 triggers via indexing and @IDX.IOTYPE sample

2013-08-27 Thread Buss, Troy (Contractor, Logitek Systems)
Regarding the recent discussion of using indexes as triggers, I use the following to update timestamps of record changes to a master item stats file that we use for controlling updates to a business warehouse (BW). Without modifying hundreds of legacy programs to support proper timestamps in t

Re: [U2] [UV] Do you avoid TRIGGERS because of the difficulty using DEBUG or RAID with them? Was: Universe Triggers

2013-08-27 Thread Hona, David
Yes, Chuck a typo in the release number and much less capable than SQL style triggers...so a backwards step too. But far less overhead and drama to setup/maintain... -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf O