Re: [U2] SAVING UNIQUE ( multivalued)

2012-05-17 Thread Rick Nuckolls
Deduping BASIC program, short version:

0001:   SELECT '' TO 1  
0002:   EXECUTE 'MERGE.LIST 0 UNION 1'  
0003:END

-Original Message-
From: u2-users-boun...@listserver.u2ug.org 
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Rick Nuckolls
Sent: Thursday, May 17, 2012 2:36 PM
To: 'U2 Users List'
Subject: Re: [U2] SAVING UNIQUE ( multivalued)

Okay,  I timed the difference with 1,400,000 or so record ids on a relatively 
old SUN box.

Union against an identical list 64930 milliseconds of CPU
Union with a blank list 31890 ms.

The result is the same.

The timings were started after both lists were instantiated, and are for the 
MERGE.LIST operation only.


-Rick 

-Original Message-
From: u2-users-boun...@listserver.u2ug.org 
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Rick Nuckolls
Sent: Thursday, May 17, 2012 2:22 PM
To: 'U2 Users List'
Subject: Re: [U2] SAVING UNIQUE ( multivalued)

I do not know the guts of the MERGE.LIST command, but it may well sort and 
dedupe each list prior to performing the merge /union operation.  But, for the 
sake of argument, suppose that, for a union, MERGE.LIST creates a single 
internal hashmap and makes an entry for each unique item in list1 and list2.  
Using a blank list for the either list in "MERGE.LIST list1 UNION list2" will 
produce the same result as using a duplicate list, but with just slightly more 
than half the work.

-Original Message-
From: u2-users-boun...@listserver.u2ug.org 
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Chris Austin
Sent: Thursday, May 17, 2012 2:15 PM
To: u2-users@listserver.u2ug.org
Subject: Re: [U2] SAVING UNIQUE ( multivalued)


Rick,

I'm not following you.. There isn't a 'second list'.. it's one list that is 
being manipulated (George's example only uses 1 list) which he calls 1 and 
UNIQUE (interchangeably) . 

Perhaps you can show us what you're referring to so we can see an example.. I 
thought George's solution was excellent.

Chris


> From: r...@lynden.com
> To: u2-users@listserver.u2ug.org
> Date: Thu, 17 May 2012 14:07:24 -0700
> Subject: Re: [U2] SAVING UNIQUE  ( multivalued)
> 
> UNION would definely be an alternative, but doing it against a needlessly 
> long second list offends my Scotch genes. It is possible to create an active, 
> zero length, selectlist programmatically, so perhaps I should write a little 
> command to do that and and a MERGE.LIST UNION against it. 
> 
> 
> 
> -Rick
> 
> On May 17, 2012, at 1:47 PM, "George Gallen"  wrote:
> 
> > What about ...
> > 
> > : P 
> > 
> > 0001: PA
> > 
> > 0002: QSELECT <> * SAVING <>  
> > 
> > 0003: SAVE.LIST UNIQUE 
> > 0004: GET.LIST UNIQUE TO 1
> > 0005: MERGE.LIST 1 UNION 1
> > 0006: SAVE.LIST UNIQUE
> > 0007: GET.LIST UNIQUE
> > 
> > (The MERGE.LIST will sort and dedupe)
> > 
> > 
> > 0004: sh -c "/usr/bin/sort -uo '&SAVEDLISTS&/UNIQUE' '&SAVEDLISTS&/UNIQUE'" 
> > 
> > 0005: GET.LIST UNIQUE
> > 
> > -Original Message-
> > From: u2-users-boun...@listserver.u2ug.org 
> > [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Rick Nuckolls
> > Sent: Thursday, May 17, 2012 4:38 PM
> > To: 'U2 Users List'
> > Subject: Re: [U2] SAVING UNIQUE ( multivalued)
> > 
> > This does present a challenge,
> > 
> > The following (non-portable solution works)
> > :ED VOC MUNIQUE 
> > 
> > 5 lines long.   
> > 
> > 
> > : P 
> > 
> > 0001: PA
> > 
> > 0002: QSELECT <> * SAVING <>  
> > 
> > 0003: SAVE.LIST UNIQUE  
> > 
> > 0004: sh -c "/usr/bin/sort -uo '&SAVEDLISTS&/UNIQUE' '&SAVEDLISTS&/UNIQUE'" 
> > 
> > 0005: GET.LIST UNIQUE
> > 
> > Or, I suppose that one could also
> > 
> > EDIT.LIST GARBAGE   
> >
> > New record. 
> > 
> > 
> > : I 
> > 
> > 0001= KAJDF;LJASDLF;KJADSL;FKJASDL;FJKASLD;JFALS;DJFLASKDF  
> > 
> > 0002=   
> > 
> > Bottom at line 1.   
> > 
> > :   
> > 
> > Top.
> > 

Re: [U2] SAVING UNIQUE ( multivalued)

2012-05-17 Thread Rick Nuckolls
Okay,  I timed the difference with 1,400,000 or so record ids on a relatively 
old SUN box.

Union against an identical list 64930 milliseconds of CPU
Union with a blank list 31890 ms.

The result is the same.

The timings were started after both lists were instantiated, and are for the 
MERGE.LIST operation only.


-Rick 

-Original Message-
From: u2-users-boun...@listserver.u2ug.org 
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Rick Nuckolls
Sent: Thursday, May 17, 2012 2:22 PM
To: 'U2 Users List'
Subject: Re: [U2] SAVING UNIQUE ( multivalued)

I do not know the guts of the MERGE.LIST command, but it may well sort and 
dedupe each list prior to performing the merge /union operation.  But, for the 
sake of argument, suppose that, for a union, MERGE.LIST creates a single 
internal hashmap and makes an entry for each unique item in list1 and list2.  
Using a blank list for the either list in "MERGE.LIST list1 UNION list2" will 
produce the same result as using a duplicate list, but with just slightly more 
than half the work.

-Original Message-
From: u2-users-boun...@listserver.u2ug.org 
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Chris Austin
Sent: Thursday, May 17, 2012 2:15 PM
To: u2-users@listserver.u2ug.org
Subject: Re: [U2] SAVING UNIQUE ( multivalued)


Rick,

I'm not following you.. There isn't a 'second list'.. it's one list that is 
being manipulated (George's example only uses 1 list) which he calls 1 and 
UNIQUE (interchangeably) . 

Perhaps you can show us what you're referring to so we can see an example.. I 
thought George's solution was excellent.

Chris


> From: r...@lynden.com
> To: u2-users@listserver.u2ug.org
> Date: Thu, 17 May 2012 14:07:24 -0700
> Subject: Re: [U2] SAVING UNIQUE  ( multivalued)
> 
> UNION would definely be an alternative, but doing it against a needlessly 
> long second list offends my Scotch genes. It is possible to create an active, 
> zero length, selectlist programmatically, so perhaps I should write a little 
> command to do that and and a MERGE.LIST UNION against it. 
> 
> 
> 
> -Rick
> 
> On May 17, 2012, at 1:47 PM, "George Gallen"  wrote:
> 
> > What about ...
> > 
> > : P 
> > 
> > 0001: PA
> > 
> > 0002: QSELECT <> * SAVING <>  
> > 
> > 0003: SAVE.LIST UNIQUE 
> > 0004: GET.LIST UNIQUE TO 1
> > 0005: MERGE.LIST 1 UNION 1
> > 0006: SAVE.LIST UNIQUE
> > 0007: GET.LIST UNIQUE
> > 
> > (The MERGE.LIST will sort and dedupe)
> > 
> > 
> > 0004: sh -c "/usr/bin/sort -uo '&SAVEDLISTS&/UNIQUE' '&SAVEDLISTS&/UNIQUE'" 
> > 
> > 0005: GET.LIST UNIQUE
> > 
> > -Original Message-
> > From: u2-users-boun...@listserver.u2ug.org 
> > [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Rick Nuckolls
> > Sent: Thursday, May 17, 2012 4:38 PM
> > To: 'U2 Users List'
> > Subject: Re: [U2] SAVING UNIQUE ( multivalued)
> > 
> > This does present a challenge,
> > 
> > The following (non-portable solution works)
> > :ED VOC MUNIQUE 
> > 
> > 5 lines long.   
> > 
> > 
> > : P 
> > 
> > 0001: PA
> > 
> > 0002: QSELECT <> * SAVING <>  
> > 
> > 0003: SAVE.LIST UNIQUE  
> > 
> > 0004: sh -c "/usr/bin/sort -uo '&SAVEDLISTS&/UNIQUE' '&SAVEDLISTS&/UNIQUE'" 
> > 
> > 0005: GET.LIST UNIQUE
> > 
> > Or, I suppose that one could also
> > 
> > EDIT.LIST GARBAGE   
> >
> > New record. 
> > 
> > 
> > : I 
> > 
> > 0001= KAJDF;LJASDLF;KJADSL;FKJASDL;FJKASLD;JFALS;DJFLASKDF  
> > 
> > 0002=   
> > 
> > Bottom at line 1.   
> > 
> > :   
> > 
> > Top.
> > 
> > : FI
> > 
> > "GARBAGE" filed in file "&SAVEDLISTS&". 
> > 
> > :GET.LIST GARBAGE TO 1  
> > 
> > 
> > 1 record(s) selected to SELECT list #1. 
> > 
> > :QSELECT IU * SAVING 19 
> > 
> > 
> > 3

Re: [U2] SAVING UNIQUE ( multivalued)

2012-05-17 Thread Rick Nuckolls
I do not know the guts of the MERGE.LIST command, but it may well sort and 
dedupe each list prior to performing the merge /union operation.  But, for the 
sake of argument, suppose that, for a union, MERGE.LIST creates a single 
internal hashmap and makes an entry for each unique item in list1 and list2.  
Using a blank list for the either list in "MERGE.LIST list1 UNION list2" will 
produce the same result as using a duplicate list, but with just slightly more 
than half the work.

-Original Message-
From: u2-users-boun...@listserver.u2ug.org 
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Chris Austin
Sent: Thursday, May 17, 2012 2:15 PM
To: u2-users@listserver.u2ug.org
Subject: Re: [U2] SAVING UNIQUE ( multivalued)


Rick,

I'm not following you.. There isn't a 'second list'.. it's one list that is 
being manipulated (George's example only uses 1 list) which he calls 1 and 
UNIQUE (interchangeably) . 

Perhaps you can show us what you're referring to so we can see an example.. I 
thought George's solution was excellent.

Chris


> From: r...@lynden.com
> To: u2-users@listserver.u2ug.org
> Date: Thu, 17 May 2012 14:07:24 -0700
> Subject: Re: [U2] SAVING UNIQUE  ( multivalued)
> 
> UNION would definely be an alternative, but doing it against a needlessly 
> long second list offends my Scotch genes. It is possible to create an active, 
> zero length, selectlist programmatically, so perhaps I should write a little 
> command to do that and and a MERGE.LIST UNION against it. 
> 
> 
> 
> -Rick
> 
> On May 17, 2012, at 1:47 PM, "George Gallen"  wrote:
> 
> > What about ...
> > 
> > : P 
> > 
> > 0001: PA
> > 
> > 0002: QSELECT <> * SAVING <>  
> > 
> > 0003: SAVE.LIST UNIQUE 
> > 0004: GET.LIST UNIQUE TO 1
> > 0005: MERGE.LIST 1 UNION 1
> > 0006: SAVE.LIST UNIQUE
> > 0007: GET.LIST UNIQUE
> > 
> > (The MERGE.LIST will sort and dedupe)
> > 
> > 
> > 0004: sh -c "/usr/bin/sort -uo '&SAVEDLISTS&/UNIQUE' '&SAVEDLISTS&/UNIQUE'" 
> > 
> > 0005: GET.LIST UNIQUE
> > 
> > -Original Message-
> > From: u2-users-boun...@listserver.u2ug.org 
> > [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Rick Nuckolls
> > Sent: Thursday, May 17, 2012 4:38 PM
> > To: 'U2 Users List'
> > Subject: Re: [U2] SAVING UNIQUE ( multivalued)
> > 
> > This does present a challenge,
> > 
> > The following (non-portable solution works)
> > :ED VOC MUNIQUE 
> > 
> > 5 lines long.   
> > 
> > 
> > : P 
> > 
> > 0001: PA
> > 
> > 0002: QSELECT <> * SAVING <>  
> > 
> > 0003: SAVE.LIST UNIQUE  
> > 
> > 0004: sh -c "/usr/bin/sort -uo '&SAVEDLISTS&/UNIQUE' '&SAVEDLISTS&/UNIQUE'" 
> > 
> > 0005: GET.LIST UNIQUE
> > 
> > Or, I suppose that one could also
> > 
> > EDIT.LIST GARBAGE   
> >
> > New record. 
> > 
> > 
> > : I 
> > 
> > 0001= KAJDF;LJASDLF;KJADSL;FKJASDL;FJKASLD;JFALS;DJFLASKDF  
> > 
> > 0002=   
> > 
> > Bottom at line 1.   
> > 
> > :   
> > 
> > Top.
> > 
> > : FI
> > 
> > "GARBAGE" filed in file "&SAVEDLISTS&". 
> > 
> > :GET.LIST GARBAGE TO 1  
> > 
> > 
> > 1 record(s) selected to SELECT list #1. 
> > 
> > :QSELECT IU * SAVING 19 
> > 
> > 
> > 32987 record(s) selected to SELECT list #0. 
> > 
> > ::MERGE.LIST 0 DIFF 1   
> > 
> > 
> > 90 record(s) selected to SELECT list #0.
> > 
> > ::  
> > 
> > 
> > Be nice if there was MV support of 'SAVING UNIQUE', or a cleaner syntactic 
> > way to use MERGE.LIST to dedupe.
> > 
> > -Rick
> > 
> > 
> > 
> > -Original Message-
> > From: u2-users-boun...@listserver.u2ug.org 
> > [mailto:u2-users-boun...@listserver.u2ug

Re: [U2] SAVING UNIQUE ( multivalued)

2012-05-17 Thread Chris Austin

No worries, it all makes perfect sense now ;) 

Thanks!

> From: ggal...@wyanokegroup.com
> To: u2-users@listserver.u2ug.org
> Date: Thu, 17 May 2012 16:16:25 -0500
> Subject: Re: [U2] SAVING UNIQUE  ( multivalued)
> 
> I may have confused you when I said the UNION does the deduping - Sorry.
> 
> -Original Message-
> From: u2-users-boun...@listserver.u2ug.org 
> [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of George Gallen
> Sent: Thursday, May 17, 2012 5:15 PM
> To: U2 Users List
> Subject: Re: [U2] SAVING UNIQUE ( multivalued)
> 
> The union combines the lists, then merge.list does the deduping when it's 
> finished the merge as it does the sorting.
> 
> George
> 
> -Original Message-
> From: u2-users-boun...@listserver.u2ug.org 
> [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Chris Austin
> Sent: Thursday, May 17, 2012 5:11 PM
> To: u2-users@listserver.u2ug.org
> Subject: Re: [U2] SAVING UNIQUE ( multivalued)
> 
> 
> The description of UNION is a bit confusing with regards to the way this 
> works:
> 
> UNION - list3 contains all elements  from  list1  and  all elements from 
> list2 that are not in list1.
> 
> >From the HELP description I would think it wouldn't work, for example:
> 
> list 1 = 1,1,2,2,3,4,5
> list 2 = 1,4,6,8
> 
> wouldn't list 3 look like the following?
> 
> list 3 = 1,1,2,2,3,4,5,6,8
> 
> How does it DEDUPE list 1? The description says it 'contains all elements 
> from list1' but there could be duplicates in list 1 so how do those get 
> shaken out?
> 
> Chris
> 
> 
> > From: ggal...@wyanokegroup.com
> > To: u2-users@listserver.u2ug.org
> > Date: Thu, 17 May 2012 16:06:10 -0500
> > Subject: Re: [U2] SAVING UNIQUE  ( multivalued)
> > 
> > Now thinking about it, I think MERGE.LIST always does sort and deduping 
> > regardless of which ACTION you use.
> > 
> > -Original Message-
> > From: u2-users-boun...@listserver.u2ug.org 
> > [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of George Gallen
> > Sent: Thursday, May 17, 2012 5:05 PM
> > To: U2 Users List
> > Subject: Re: [U2] SAVING UNIQUE ( multivalued)
> > 
> > MERGE.LIST Sorts automatically,
> > 
> > The UNION does the DEDUPING
> > 
> > The 1 union 1 - says to union of list#1 with list#1 (itself)
> > 
> > Otherwise:
> > 
> > MERGE.LIST # ACTION # TO #
> > 
> > Where ACTION = (UNION, INTERSECT or DIFF)
> > And the TO # will save the results to that list# (if it's not specified, 
> > the default list #0 is used)
> > 
> > George
> > 
> > -Original Message-
> > From: u2-users-boun...@listserver.u2ug.org 
> > [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Chris Austin
> > Sent: Thursday, May 17, 2012 5:00 PM
> > To: u2-users@listserver.u2ug.org
> > Subject: Re: [U2] SAVING UNIQUE ( multivalued)
> > 
> > 
> > That works beautifully George, thanks for the tip! I've never used the 
> > MERGE.LIST command  before, I assume the line you have
> > 
> > > 0005: MERGE.LIST 1 UNION 1
> > 
> > basically take the list #1 and shakes out the unique values?
> > 
> > Chris
> > 
> > 
> > > From: ggal...@wyanokegroup.com
> > > To: u2-users@listserver.u2ug.org
> > > Date: Thu, 17 May 2012 15:47:11 -0500
> > > Subject: Re: [U2] SAVING UNIQUE  ( multivalued)
> > > 
> > > What about ...
> > > 
> > > : P   
> > >   
> > > 0001: PA  
> > >   
> > > 0002: QSELECT <> * SAVING <>
> > >   
> > > 0003: SAVE.LIST UNIQUE 
> > > 0004: GET.LIST UNIQUE TO 1
> > > 0005: MERGE.LIST 1 UNION 1
> > > 0006: SAVE.LIST UNIQUE
> > > 0007: GET.LIST UNIQUE
> > > 
> > > (The MERGE.LIST will sort and dedupe)
> > > 
> > >  
> > > 0004: sh -c "/usr/bin/sort -uo '&SAVEDLISTS&/UNIQUE' 
> > > '&SAVEDLISTS&/UNIQUE'" 
> > > 0005: GET.LIST UNIQUE
> > > 
> > > -Original Message-
> > > From: u2-users-boun...@listserver.u2ug.org 
> > > [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Rick Nuckolls
> > > Sent: Thursday, May 17, 2012 4:38 PM
> > > To: 'U2 Users List'
> > > Subject: Re: [U2] SAVING UNIQUE ( multivalued)
> > > 
> > > This does present a challenge,
> > > 
> > > The following (non-portable solution works)
> > > :ED VOC MUNIQUE   
> > >   
> > > 5 lines long. 
> > >   
> > >   
> > >   
> > > : P   
> > >   
> > > 0001: PA  
> > >   
> > > 0002: QSELECT <> * SAVING <>
> > >   
> > > 0003: SAVE.LIST UNIQUE
> > >   
> > > 0004: sh -c "/usr/bin/sort -uo '&SAVEDL

Re: [U2] SAVING UNIQUE ( multivalued)

2012-05-17 Thread George Gallen
I may have confused you when I said the UNION does the deduping - Sorry.

-Original Message-
From: u2-users-boun...@listserver.u2ug.org 
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of George Gallen
Sent: Thursday, May 17, 2012 5:15 PM
To: U2 Users List
Subject: Re: [U2] SAVING UNIQUE ( multivalued)

The union combines the lists, then merge.list does the deduping when it's 
finished the merge as it does the sorting.

George

-Original Message-
From: u2-users-boun...@listserver.u2ug.org 
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Chris Austin
Sent: Thursday, May 17, 2012 5:11 PM
To: u2-users@listserver.u2ug.org
Subject: Re: [U2] SAVING UNIQUE ( multivalued)


The description of UNION is a bit confusing with regards to the way this works:

UNION - list3 contains all elements  from  list1  and  all elements from list2 
that are not in list1.

>From the HELP description I would think it wouldn't work, for example:

list 1 = 1,1,2,2,3,4,5
list 2 = 1,4,6,8

wouldn't list 3 look like the following?

list 3 = 1,1,2,2,3,4,5,6,8

How does it DEDUPE list 1? The description says it 'contains all elements from 
list1' but there could be duplicates in list 1 so how do those get shaken out?

Chris


> From: ggal...@wyanokegroup.com
> To: u2-users@listserver.u2ug.org
> Date: Thu, 17 May 2012 16:06:10 -0500
> Subject: Re: [U2] SAVING UNIQUE  ( multivalued)
> 
> Now thinking about it, I think MERGE.LIST always does sort and deduping 
> regardless of which ACTION you use.
> 
> -Original Message-
> From: u2-users-boun...@listserver.u2ug.org 
> [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of George Gallen
> Sent: Thursday, May 17, 2012 5:05 PM
> To: U2 Users List
> Subject: Re: [U2] SAVING UNIQUE ( multivalued)
> 
> MERGE.LIST Sorts automatically,
> 
> The UNION does the DEDUPING
> 
> The 1 union 1 - says to union of list#1 with list#1 (itself)
> 
> Otherwise:
> 
> MERGE.LIST # ACTION # TO #
> 
> Where ACTION = (UNION, INTERSECT or DIFF)
> And the TO # will save the results to that list# (if it's not specified, the 
> default list #0 is used)
> 
> George
> 
> -Original Message-
> From: u2-users-boun...@listserver.u2ug.org 
> [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Chris Austin
> Sent: Thursday, May 17, 2012 5:00 PM
> To: u2-users@listserver.u2ug.org
> Subject: Re: [U2] SAVING UNIQUE ( multivalued)
> 
> 
> That works beautifully George, thanks for the tip! I've never used the 
> MERGE.LIST command  before, I assume the line you have
> 
> > 0005: MERGE.LIST 1 UNION 1
> 
> basically take the list #1 and shakes out the unique values?
> 
> Chris
> 
> 
> > From: ggal...@wyanokegroup.com
> > To: u2-users@listserver.u2ug.org
> > Date: Thu, 17 May 2012 15:47:11 -0500
> > Subject: Re: [U2] SAVING UNIQUE  ( multivalued)
> > 
> > What about ...
> > 
> > : P 
> > 
> > 0001: PA
> > 
> > 0002: QSELECT <> * SAVING <>  
> > 
> > 0003: SAVE.LIST UNIQUE 
> > 0004: GET.LIST UNIQUE TO 1
> > 0005: MERGE.LIST 1 UNION 1
> > 0006: SAVE.LIST UNIQUE
> > 0007: GET.LIST UNIQUE
> > 
> > (The MERGE.LIST will sort and dedupe)
> > 
> >  
> > 0004: sh -c "/usr/bin/sort -uo '&SAVEDLISTS&/UNIQUE' '&SAVEDLISTS&/UNIQUE'" 
> > 
> > 0005: GET.LIST UNIQUE
> > 
> > -Original Message-
> > From: u2-users-boun...@listserver.u2ug.org 
> > [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Rick Nuckolls
> > Sent: Thursday, May 17, 2012 4:38 PM
> > To: 'U2 Users List'
> > Subject: Re: [U2] SAVING UNIQUE ( multivalued)
> > 
> > This does present a challenge,
> > 
> > The following (non-portable solution works)
> > :ED VOC MUNIQUE 
> > 
> > 5 lines long.   
> > 
> > 
> > 
> > : P 
> > 
> > 0001: PA
> > 
> > 0002: QSELECT <> * SAVING <>  
> > 
> > 0003: SAVE.LIST UNIQUE  
> > 
> > 0004: sh -c "/usr/bin/sort -uo '&SAVEDLISTS&/UNIQUE' '&SAVEDLISTS&/UNIQUE'" 
> > 
> > 0005: GET.LIST UNIQUE
> > 
> > Or, I suppose that one could also
> > 
> > EDIT.LIST GARBAGE   
> >
> > New record. 
> > 
> > 
> > 
> > : I 
> > 
> > 0001= KAJDF;LJASDLF;KJADS

Re: [U2] SAVING UNIQUE ( multivalued)

2012-05-17 Thread George Gallen
The union combines the lists, then merge.list does the deduping when it's 
finished the merge as it does the sorting.

George

-Original Message-
From: u2-users-boun...@listserver.u2ug.org 
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Chris Austin
Sent: Thursday, May 17, 2012 5:11 PM
To: u2-users@listserver.u2ug.org
Subject: Re: [U2] SAVING UNIQUE ( multivalued)


The description of UNION is a bit confusing with regards to the way this works:

UNION - list3 contains all elements  from  list1  and  all elements from list2 
that are not in list1.

>From the HELP description I would think it wouldn't work, for example:

list 1 = 1,1,2,2,3,4,5
list 2 = 1,4,6,8

wouldn't list 3 look like the following?

list 3 = 1,1,2,2,3,4,5,6,8

How does it DEDUPE list 1? The description says it 'contains all elements from 
list1' but there could be duplicates in list 1 so how do those get shaken out?

Chris


> From: ggal...@wyanokegroup.com
> To: u2-users@listserver.u2ug.org
> Date: Thu, 17 May 2012 16:06:10 -0500
> Subject: Re: [U2] SAVING UNIQUE  ( multivalued)
> 
> Now thinking about it, I think MERGE.LIST always does sort and deduping 
> regardless of which ACTION you use.
> 
> -Original Message-
> From: u2-users-boun...@listserver.u2ug.org 
> [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of George Gallen
> Sent: Thursday, May 17, 2012 5:05 PM
> To: U2 Users List
> Subject: Re: [U2] SAVING UNIQUE ( multivalued)
> 
> MERGE.LIST Sorts automatically,
> 
> The UNION does the DEDUPING
> 
> The 1 union 1 - says to union of list#1 with list#1 (itself)
> 
> Otherwise:
> 
> MERGE.LIST # ACTION # TO #
> 
> Where ACTION = (UNION, INTERSECT or DIFF)
> And the TO # will save the results to that list# (if it's not specified, the 
> default list #0 is used)
> 
> George
> 
> -Original Message-
> From: u2-users-boun...@listserver.u2ug.org 
> [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Chris Austin
> Sent: Thursday, May 17, 2012 5:00 PM
> To: u2-users@listserver.u2ug.org
> Subject: Re: [U2] SAVING UNIQUE ( multivalued)
> 
> 
> That works beautifully George, thanks for the tip! I've never used the 
> MERGE.LIST command  before, I assume the line you have
> 
> > 0005: MERGE.LIST 1 UNION 1
> 
> basically take the list #1 and shakes out the unique values?
> 
> Chris
> 
> 
> > From: ggal...@wyanokegroup.com
> > To: u2-users@listserver.u2ug.org
> > Date: Thu, 17 May 2012 15:47:11 -0500
> > Subject: Re: [U2] SAVING UNIQUE  ( multivalued)
> > 
> > What about ...
> > 
> > : P 
> > 
> > 0001: PA
> > 
> > 0002: QSELECT <> * SAVING <>  
> > 
> > 0003: SAVE.LIST UNIQUE 
> > 0004: GET.LIST UNIQUE TO 1
> > 0005: MERGE.LIST 1 UNION 1
> > 0006: SAVE.LIST UNIQUE
> > 0007: GET.LIST UNIQUE
> > 
> > (The MERGE.LIST will sort and dedupe)
> > 
> >  
> > 0004: sh -c "/usr/bin/sort -uo '&SAVEDLISTS&/UNIQUE' '&SAVEDLISTS&/UNIQUE'" 
> > 
> > 0005: GET.LIST UNIQUE
> > 
> > -Original Message-
> > From: u2-users-boun...@listserver.u2ug.org 
> > [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Rick Nuckolls
> > Sent: Thursday, May 17, 2012 4:38 PM
> > To: 'U2 Users List'
> > Subject: Re: [U2] SAVING UNIQUE ( multivalued)
> > 
> > This does present a challenge,
> > 
> > The following (non-portable solution works)
> > :ED VOC MUNIQUE 
> > 
> > 5 lines long.   
> > 
> > 
> > 
> > : P 
> > 
> > 0001: PA
> > 
> > 0002: QSELECT <> * SAVING <>  
> > 
> > 0003: SAVE.LIST UNIQUE  
> > 
> > 0004: sh -c "/usr/bin/sort -uo '&SAVEDLISTS&/UNIQUE' '&SAVEDLISTS&/UNIQUE'" 
> > 
> > 0005: GET.LIST UNIQUE
> > 
> > Or, I suppose that one could also
> > 
> > EDIT.LIST GARBAGE   
> >
> > New record. 
> > 
> > 
> > 
> > : I 
> > 
> > 0001= KAJDF;LJASDLF;KJADSL;FKJASDL;FJKASLD;JFALS;DJFLASKDF  
> > 
> > 0002=   
> > 
> > Bottom at line 1.   
> > 
> > :   

Re: [U2] SAVING UNIQUE ( multivalued)

2012-05-17 Thread Chris Austin

Rick,

I'm not following you.. There isn't a 'second list'.. it's one list that is 
being manipulated (George's example only uses 1 list) which he calls 1 and 
UNIQUE (interchangeably) . 

Perhaps you can show us what you're referring to so we can see an example.. I 
thought George's solution was excellent.

Chris


> From: r...@lynden.com
> To: u2-users@listserver.u2ug.org
> Date: Thu, 17 May 2012 14:07:24 -0700
> Subject: Re: [U2] SAVING UNIQUE  ( multivalued)
> 
> UNION would definely be an alternative, but doing it against a needlessly 
> long second list offends my Scotch genes. It is possible to create an active, 
> zero length, selectlist programmatically, so perhaps I should write a little 
> command to do that and and a MERGE.LIST UNION against it. 
> 
> 
> 
> -Rick
> 
> On May 17, 2012, at 1:47 PM, "George Gallen"  wrote:
> 
> > What about ...
> > 
> > : P 
> > 
> > 0001: PA
> > 
> > 0002: QSELECT <> * SAVING <>  
> > 
> > 0003: SAVE.LIST UNIQUE 
> > 0004: GET.LIST UNIQUE TO 1
> > 0005: MERGE.LIST 1 UNION 1
> > 0006: SAVE.LIST UNIQUE
> > 0007: GET.LIST UNIQUE
> > 
> > (The MERGE.LIST will sort and dedupe)
> > 
> > 
> > 0004: sh -c "/usr/bin/sort -uo '&SAVEDLISTS&/UNIQUE' '&SAVEDLISTS&/UNIQUE'" 
> > 
> > 0005: GET.LIST UNIQUE
> > 
> > -Original Message-
> > From: u2-users-boun...@listserver.u2ug.org 
> > [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Rick Nuckolls
> > Sent: Thursday, May 17, 2012 4:38 PM
> > To: 'U2 Users List'
> > Subject: Re: [U2] SAVING UNIQUE ( multivalued)
> > 
> > This does present a challenge,
> > 
> > The following (non-portable solution works)
> > :ED VOC MUNIQUE 
> > 
> > 5 lines long.   
> > 
> > 
> > : P 
> > 
> > 0001: PA
> > 
> > 0002: QSELECT <> * SAVING <>  
> > 
> > 0003: SAVE.LIST UNIQUE  
> > 
> > 0004: sh -c "/usr/bin/sort -uo '&SAVEDLISTS&/UNIQUE' '&SAVEDLISTS&/UNIQUE'" 
> > 
> > 0005: GET.LIST UNIQUE
> > 
> > Or, I suppose that one could also
> > 
> > EDIT.LIST GARBAGE   
> >
> > New record. 
> > 
> > 
> > : I 
> > 
> > 0001= KAJDF;LJASDLF;KJADSL;FKJASDL;FJKASLD;JFALS;DJFLASKDF  
> > 
> > 0002=   
> > 
> > Bottom at line 1.   
> > 
> > :   
> > 
> > Top.
> > 
> > : FI
> > 
> > "GARBAGE" filed in file "&SAVEDLISTS&". 
> > 
> > :GET.LIST GARBAGE TO 1  
> > 
> > 
> > 1 record(s) selected to SELECT list #1. 
> > 
> > :QSELECT IU * SAVING 19 
> > 
> > 
> > 32987 record(s) selected to SELECT list #0. 
> > 
> > ::MERGE.LIST 0 DIFF 1   
> > 
> > 
> > 90 record(s) selected to SELECT list #0.
> > 
> > ::  
> > 
> > 
> > Be nice if there was MV support of 'SAVING UNIQUE', or a cleaner syntactic 
> > way to use MERGE.LIST to dedupe.
> > 
> > -Rick
> > 
> > 
> > 
> > -Original Message-
> > From: u2-users-boun...@listserver.u2ug.org 
> > [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Chris Austin
> > Sent: Thursday, May 17, 2012 1:20 PM
> > To: u2-users@listserver.u2ug.org
> > Subject: Re: [U2] SAVING UNIQUE ( multivalued)
> > 
> > 
> > I usually get my exploded list and then DEDUPE using the following:
> > 
> > LOCATE  VALUE.TO.FIND IN UNIQUE.LIST BY "AL" SETTING POS ELSE
> > UNIQUE.LIST = INSERT(UNIQUE.LIST,1,POS,0,VALUE.TO.FIND)
> > END
> > 
> > This puts everything in a nice ARRAY called UNIQUE.LIST, I then can use a 
> > FOR loop to loop through as needed.
> > 
> > Chris
> > 
> > 
> >> To: u2-users@listserver.u2ug.org
> >> From: wjhon...@aol.com
> >> Date: Thu, 17 May 2012 16:13:31 -0400
> >> Subject: Re: [U2] SAVING UNIQUE  ( multivalued)
> >> 
> >> 
> >> You have two issues.
> >> One is to crea

Re: [U2] SAVING UNIQUE ( multivalued)

2012-05-17 Thread George Gallen
To be honest, it's fast, really fast. It would probably take you longer to 
create the zero length list than
  It would save in any processing time.

George

-Original Message-
From: u2-users-boun...@listserver.u2ug.org 
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Rick Nuckolls
Sent: Thursday, May 17, 2012 5:07 PM
To: U2 Users List
Subject: Re: [U2] SAVING UNIQUE ( multivalued)

UNION would definely be an alternative, but doing it against a needlessly long 
second list offends my Scotch genes. It is possible to create an active, zero 
length, selectlist programmatically, so perhaps I should write a little command 
to do that and and a MERGE.LIST UNION against it. 



-Rick

On May 17, 2012, at 1:47 PM, "George Gallen"  wrote:

> What about ...
> 
> : P   
>   
> 0001: PA  
>   
> 0002: QSELECT <> * SAVING <>
>   
> 0003: SAVE.LIST UNIQUE 
> 0004: GET.LIST UNIQUE TO 1
> 0005: MERGE.LIST 1 UNION 1
> 0006: SAVE.LIST UNIQUE
> 0007: GET.LIST UNIQUE
> 
> (The MERGE.LIST will sort and dedupe)
> 
> 
> 0004: sh -c "/usr/bin/sort -uo '&SAVEDLISTS&/UNIQUE' '&SAVEDLISTS&/UNIQUE'"   
>   
> 0005: GET.LIST UNIQUE
> 
> -Original Message-
> From: u2-users-boun...@listserver.u2ug.org 
> [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Rick Nuckolls
> Sent: Thursday, May 17, 2012 4:38 PM
> To: 'U2 Users List'
> Subject: Re: [U2] SAVING UNIQUE ( multivalued)
> 
> This does present a challenge,
> 
> The following (non-portable solution works)
> :ED VOC MUNIQUE   
>   
> 5 lines long. 
>   
> 
> : P   
>   
> 0001: PA  
>   
> 0002: QSELECT <> * SAVING <>
>   
> 0003: SAVE.LIST UNIQUE
>   
> 0004: sh -c "/usr/bin/sort -uo '&SAVEDLISTS&/UNIQUE' '&SAVEDLISTS&/UNIQUE'"   
>   
> 0005: GET.LIST UNIQUE
> 
> Or, I suppose that one could also
> 
> EDIT.LIST GARBAGE 
>  
> New record.   
>   
> 
> : I   
>   
> 0001= KAJDF;LJASDLF;KJADSL;FKJASDL;FJKASLD;JFALS;DJFLASKDF
>   
> 0002= 
>   
> Bottom at line 1. 
>   
> : 
>   
> Top.  
>   
> : FI  
>   
> "GARBAGE" filed in file "&SAVEDLISTS&".   
>   
> :GET.LIST GARBAGE TO 1
>   
> 
> 1 record(s) selected to SELECT list #1.   
>   
> :QSELECT IU * SAVING 19   
>   
> 
> 32987 record(s) selected to SELECT list #0.   
>   
> ::MERGE.LIST 0 DIFF 1 
>   
> 
> 90 record(s) selected to SELECT list #0.  
>   
> ::  
> 
> 
> Be nice if there was MV support of 'SAVING UNIQUE', or a cleaner syntactic 
> way to use MERGE.LIST to dedupe.
> 
> -Rick
> 
> 
> 
> -Original Message-
> From: u2-users-boun...@listserver.u2ug.org 
> [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Chris Austin
> Sent: Thursday, May 17, 2012 1:20 PM
> To: u2-users@listserver.u2ug.org
> Subject: Re: [U2] SAVING UNIQUE ( multivalued)
> 
> 
> I usually get my exploded list and then DEDUPE using the following:
> 
> LOCATE  VALUE.TO.FIND IN UNIQUE.LIST BY "AL" SETTING POS ELSE
> UNIQUE.LIST = INSERT(UNIQUE.LIST,1,POS,0,VALUE.TO.FIND)
> END
> 
> This puts everything in a nice ARRAY called UNIQUE.LIST, I then can use a FOR 
> loop to loop through as needed.
> 
> Chris
> 
> 
>> To: u2-users@listserver.u2ug.org
>> From: wjhon...@aol.com
>> Date: Thu, 17 May 2012 16:13:31 -0400
>> Subject: Re: [U2] SAVING UNIQUE  ( multivalued)
>> 
>> 
>> You have two issues.
>> One is to create a list from an exploded multi-value
>> The other issue, is to dedupe that list.
>> 
>> Without using something like REFORMAT I don't think you can get the two 
>> issues resolved at once.
>> Qselect does not allow Unique
>> So
>> QSELECT MYFILE SAVING 2
>> will explode the multi-values, but it won't dedupe them.
>> 
>> 
>> 
>> 

Re: [U2] SAVING UNIQUE ( multivalued)

2012-05-17 Thread Chris Austin

The description of UNION is a bit confusing with regards to the way this works:

UNION - list3 contains all elements  from  list1  and  all elements from list2 
that are not in list1.

>From the HELP description I would think it wouldn't work, for example:

list 1 = 1,1,2,2,3,4,5
list 2 = 1,4,6,8

wouldn't list 3 look like the following?

list 3 = 1,1,2,2,3,4,5,6,8

How does it DEDUPE list 1? The description says it 'contains all elements from 
list1' but there could be duplicates in list 1 so how do those get shaken out?

Chris


> From: ggal...@wyanokegroup.com
> To: u2-users@listserver.u2ug.org
> Date: Thu, 17 May 2012 16:06:10 -0500
> Subject: Re: [U2] SAVING UNIQUE  ( multivalued)
> 
> Now thinking about it, I think MERGE.LIST always does sort and deduping 
> regardless of which ACTION you use.
> 
> -Original Message-
> From: u2-users-boun...@listserver.u2ug.org 
> [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of George Gallen
> Sent: Thursday, May 17, 2012 5:05 PM
> To: U2 Users List
> Subject: Re: [U2] SAVING UNIQUE ( multivalued)
> 
> MERGE.LIST Sorts automatically,
> 
> The UNION does the DEDUPING
> 
> The 1 union 1 - says to union of list#1 with list#1 (itself)
> 
> Otherwise:
> 
> MERGE.LIST # ACTION # TO #
> 
> Where ACTION = (UNION, INTERSECT or DIFF)
> And the TO # will save the results to that list# (if it's not specified, the 
> default list #0 is used)
> 
> George
> 
> -Original Message-
> From: u2-users-boun...@listserver.u2ug.org 
> [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Chris Austin
> Sent: Thursday, May 17, 2012 5:00 PM
> To: u2-users@listserver.u2ug.org
> Subject: Re: [U2] SAVING UNIQUE ( multivalued)
> 
> 
> That works beautifully George, thanks for the tip! I've never used the 
> MERGE.LIST command  before, I assume the line you have
> 
> > 0005: MERGE.LIST 1 UNION 1
> 
> basically take the list #1 and shakes out the unique values?
> 
> Chris
> 
> 
> > From: ggal...@wyanokegroup.com
> > To: u2-users@listserver.u2ug.org
> > Date: Thu, 17 May 2012 15:47:11 -0500
> > Subject: Re: [U2] SAVING UNIQUE  ( multivalued)
> > 
> > What about ...
> > 
> > : P 
> > 
> > 0001: PA
> > 
> > 0002: QSELECT <> * SAVING <>  
> > 
> > 0003: SAVE.LIST UNIQUE 
> > 0004: GET.LIST UNIQUE TO 1
> > 0005: MERGE.LIST 1 UNION 1
> > 0006: SAVE.LIST UNIQUE
> > 0007: GET.LIST UNIQUE
> > 
> > (The MERGE.LIST will sort and dedupe)
> > 
> >  
> > 0004: sh -c "/usr/bin/sort -uo '&SAVEDLISTS&/UNIQUE' '&SAVEDLISTS&/UNIQUE'" 
> > 
> > 0005: GET.LIST UNIQUE
> > 
> > -Original Message-
> > From: u2-users-boun...@listserver.u2ug.org 
> > [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Rick Nuckolls
> > Sent: Thursday, May 17, 2012 4:38 PM
> > To: 'U2 Users List'
> > Subject: Re: [U2] SAVING UNIQUE ( multivalued)
> > 
> > This does present a challenge,
> > 
> > The following (non-portable solution works)
> > :ED VOC MUNIQUE 
> > 
> > 5 lines long.   
> > 
> > 
> > 
> > : P 
> > 
> > 0001: PA
> > 
> > 0002: QSELECT <> * SAVING <>  
> > 
> > 0003: SAVE.LIST UNIQUE  
> > 
> > 0004: sh -c "/usr/bin/sort -uo '&SAVEDLISTS&/UNIQUE' '&SAVEDLISTS&/UNIQUE'" 
> > 
> > 0005: GET.LIST UNIQUE
> > 
> > Or, I suppose that one could also
> > 
> > EDIT.LIST GARBAGE   
> >
> > New record. 
> > 
> > 
> > 
> > : I 
> > 
> > 0001= KAJDF;LJASDLF;KJADSL;FKJASDL;FJKASLD;JFALS;DJFLASKDF  
> > 
> > 0002=   
> > 
> > Bottom at line 1.   
> > 
> > :   
> > 
> > Top.
> > 
> > : FI
> > 
> > "GARBAGE" filed in file "&SAVEDLISTS&". 
> > 
> > :GET.LIST GARBAGE TO 1  
> > 
> >   

Re: [U2] SAVING UNIQUE ( multivalued)

2012-05-17 Thread Rick Nuckolls
UNION would definely be an alternative, but doing it against a needlessly long 
second list offends my Scotch genes. It is possible to create an active, zero 
length, selectlist programmatically, so perhaps I should write a little command 
to do that and and a MERGE.LIST UNION against it. 



-Rick

On May 17, 2012, at 1:47 PM, "George Gallen"  wrote:

> What about ...
> 
> : P   
>   
> 0001: PA  
>   
> 0002: QSELECT <> * SAVING <>
>   
> 0003: SAVE.LIST UNIQUE 
> 0004: GET.LIST UNIQUE TO 1
> 0005: MERGE.LIST 1 UNION 1
> 0006: SAVE.LIST UNIQUE
> 0007: GET.LIST UNIQUE
> 
> (The MERGE.LIST will sort and dedupe)
> 
> 
> 0004: sh -c "/usr/bin/sort -uo '&SAVEDLISTS&/UNIQUE' '&SAVEDLISTS&/UNIQUE'"   
>   
> 0005: GET.LIST UNIQUE
> 
> -Original Message-
> From: u2-users-boun...@listserver.u2ug.org 
> [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Rick Nuckolls
> Sent: Thursday, May 17, 2012 4:38 PM
> To: 'U2 Users List'
> Subject: Re: [U2] SAVING UNIQUE ( multivalued)
> 
> This does present a challenge,
> 
> The following (non-portable solution works)
> :ED VOC MUNIQUE   
>   
> 5 lines long. 
>   
> 
> : P   
>   
> 0001: PA  
>   
> 0002: QSELECT <> * SAVING <>
>   
> 0003: SAVE.LIST UNIQUE
>   
> 0004: sh -c "/usr/bin/sort -uo '&SAVEDLISTS&/UNIQUE' '&SAVEDLISTS&/UNIQUE'"   
>   
> 0005: GET.LIST UNIQUE
> 
> Or, I suppose that one could also
> 
> EDIT.LIST GARBAGE 
>  
> New record.   
>   
> 
> : I   
>   
> 0001= KAJDF;LJASDLF;KJADSL;FKJASDL;FJKASLD;JFALS;DJFLASKDF
>   
> 0002= 
>   
> Bottom at line 1. 
>   
> : 
>   
> Top.  
>   
> : FI  
>   
> "GARBAGE" filed in file "&SAVEDLISTS&".   
>   
> :GET.LIST GARBAGE TO 1
>   
> 
> 1 record(s) selected to SELECT list #1.   
>   
> :QSELECT IU * SAVING 19   
>   
> 
> 32987 record(s) selected to SELECT list #0.   
>   
> ::MERGE.LIST 0 DIFF 1 
>   
> 
> 90 record(s) selected to SELECT list #0.  
>   
> ::  
> 
> 
> Be nice if there was MV support of 'SAVING UNIQUE', or a cleaner syntactic 
> way to use MERGE.LIST to dedupe.
> 
> -Rick
> 
> 
> 
> -Original Message-
> From: u2-users-boun...@listserver.u2ug.org 
> [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Chris Austin
> Sent: Thursday, May 17, 2012 1:20 PM
> To: u2-users@listserver.u2ug.org
> Subject: Re: [U2] SAVING UNIQUE ( multivalued)
> 
> 
> I usually get my exploded list and then DEDUPE using the following:
> 
> LOCATE  VALUE.TO.FIND IN UNIQUE.LIST BY "AL" SETTING POS ELSE
> UNIQUE.LIST = INSERT(UNIQUE.LIST,1,POS,0,VALUE.TO.FIND)
> END
> 
> This puts everything in a nice ARRAY called UNIQUE.LIST, I then can use a FOR 
> loop to loop through as needed.
> 
> Chris
> 
> 
>> To: u2-users@listserver.u2ug.org
>> From: wjhon...@aol.com
>> Date: Thu, 17 May 2012 16:13:31 -0400
>> Subject: Re: [U2] SAVING UNIQUE  ( multivalued)
>> 
>> 
>> You have two issues.
>> One is to create a list from an exploded multi-value
>> The other issue, is to dedupe that list.
>> 
>> Without using something like REFORMAT I don't think you can get the two 
>> issues resolved at once.
>> Qselect does not allow Unique
>> So
>> QSELECT MYFILE SAVING 2
>> will explode the multi-values, but it won't dedupe them.
>> 
>> 
>> 
>> -Original Message-
>> From: Rick Nuckolls 
>> To: 'U2 Users List' 
>> Sent: Thu, May 17, 2012 1:06 pm
>> Subject: [U2] SAVING UNIQUE ( multivalued)
>> 
>> 
>> Does anyone know a trick to achieve the equivalent of
>> SELECT filename SAVING UNIQUE fieldname
>> When "fieldname" is the name of a multivalued field, and I want a list  of 
>> all 
>> he unique values for that field?
>> The syntax above do

Re: [U2] SAVING UNIQUE ( multivalued)

2012-05-17 Thread George Gallen
Now thinking about it, I think MERGE.LIST always does sort and deduping 
regardless of which ACTION you use.

-Original Message-
From: u2-users-boun...@listserver.u2ug.org 
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of George Gallen
Sent: Thursday, May 17, 2012 5:05 PM
To: U2 Users List
Subject: Re: [U2] SAVING UNIQUE ( multivalued)

MERGE.LIST Sorts automatically,

The UNION does the DEDUPING

The 1 union 1 - says to union of list#1 with list#1 (itself)

Otherwise:

MERGE.LIST # ACTION # TO #

Where ACTION = (UNION, INTERSECT or DIFF)
And the TO # will save the results to that list# (if it's not specified, the 
default list #0 is used)

George

-Original Message-
From: u2-users-boun...@listserver.u2ug.org 
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Chris Austin
Sent: Thursday, May 17, 2012 5:00 PM
To: u2-users@listserver.u2ug.org
Subject: Re: [U2] SAVING UNIQUE ( multivalued)


That works beautifully George, thanks for the tip! I've never used the 
MERGE.LIST command  before, I assume the line you have

> 0005: MERGE.LIST 1 UNION 1

basically take the list #1 and shakes out the unique values?

Chris


> From: ggal...@wyanokegroup.com
> To: u2-users@listserver.u2ug.org
> Date: Thu, 17 May 2012 15:47:11 -0500
> Subject: Re: [U2] SAVING UNIQUE  ( multivalued)
> 
> What about ...
> 
> : P   
>   
> 0001: PA  
>   
> 0002: QSELECT <> * SAVING <>
>   
> 0003: SAVE.LIST UNIQUE 
> 0004: GET.LIST UNIQUE TO 1
> 0005: MERGE.LIST 1 UNION 1
> 0006: SAVE.LIST UNIQUE
> 0007: GET.LIST UNIQUE
> 
> (The MERGE.LIST will sort and dedupe)
> 
>  
> 0004: sh -c "/usr/bin/sort -uo '&SAVEDLISTS&/UNIQUE' '&SAVEDLISTS&/UNIQUE'"   
>   
> 0005: GET.LIST UNIQUE
> 
> -Original Message-
> From: u2-users-boun...@listserver.u2ug.org 
> [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Rick Nuckolls
> Sent: Thursday, May 17, 2012 4:38 PM
> To: 'U2 Users List'
> Subject: Re: [U2] SAVING UNIQUE ( multivalued)
> 
> This does present a challenge,
> 
> The following (non-portable solution works)
> :ED VOC MUNIQUE   
>   
> 5 lines long. 
>   
>   
>   
> : P   
>   
> 0001: PA  
>   
> 0002: QSELECT <> * SAVING <>
>   
> 0003: SAVE.LIST UNIQUE
>   
> 0004: sh -c "/usr/bin/sort -uo '&SAVEDLISTS&/UNIQUE' '&SAVEDLISTS&/UNIQUE'"   
>   
> 0005: GET.LIST UNIQUE
> 
> Or, I suppose that one could also
> 
> EDIT.LIST GARBAGE 
>  
> New record.   
>   
>   
>   
> : I   
>   
> 0001= KAJDF;LJASDLF;KJADSL;FKJASDL;FJKASLD;JFALS;DJFLASKDF
>   
> 0002= 
>   
> Bottom at line 1. 
>   
> : 
>   
> Top.  
>   
> : FI  
>   
> "GARBAGE" filed in file "&SAVEDLISTS&".   
>   
> :GET.LIST GARBAGE TO 1
>   
>   
>   
> 1 record(s) selected to SELECT list #1.   
>   
> :QSELECT IU * SAVING 19   
>   
>   
>   
> 32987 record(s) selected to SELECT list #0.   
>   
> ::MERGE.LIST 0 DIFF 1 
>   
>   
>   
> 90 record(s) selected to SELECT list #0.  
>   
> ::  
> 
> 
> Be nice if there was MV support of 'SAVING UNIQUE', or a cleaner syntactic 
> way to use MERGE.LIST to dedupe.
> 
> -Rick
> 
> 
> 
> -Original Message-
> From: u2-users-boun...@listserver.u2ug.org 
> [mailto:u2-users-boun...@listserver.u2

Re: [U2] SAVING UNIQUE ( multivalued)

2012-05-17 Thread George Gallen
MERGE.LIST Sorts automatically,

The UNION does the DEDUPING

The 1 union 1 - says to union of list#1 with list#1 (itself)

Otherwise:

MERGE.LIST # ACTION # TO #

Where ACTION = (UNION, INTERSECT or DIFF)
And the TO # will save the results to that list# (if it's not specified, the 
default list #0 is used)

George

-Original Message-
From: u2-users-boun...@listserver.u2ug.org 
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Chris Austin
Sent: Thursday, May 17, 2012 5:00 PM
To: u2-users@listserver.u2ug.org
Subject: Re: [U2] SAVING UNIQUE ( multivalued)


That works beautifully George, thanks for the tip! I've never used the 
MERGE.LIST command  before, I assume the line you have

> 0005: MERGE.LIST 1 UNION 1

basically take the list #1 and shakes out the unique values?

Chris


> From: ggal...@wyanokegroup.com
> To: u2-users@listserver.u2ug.org
> Date: Thu, 17 May 2012 15:47:11 -0500
> Subject: Re: [U2] SAVING UNIQUE  ( multivalued)
> 
> What about ...
> 
> : P   
>   
> 0001: PA  
>   
> 0002: QSELECT <> * SAVING <>
>   
> 0003: SAVE.LIST UNIQUE 
> 0004: GET.LIST UNIQUE TO 1
> 0005: MERGE.LIST 1 UNION 1
> 0006: SAVE.LIST UNIQUE
> 0007: GET.LIST UNIQUE
> 
> (The MERGE.LIST will sort and dedupe)
> 
>  
> 0004: sh -c "/usr/bin/sort -uo '&SAVEDLISTS&/UNIQUE' '&SAVEDLISTS&/UNIQUE'"   
>   
> 0005: GET.LIST UNIQUE
> 
> -Original Message-
> From: u2-users-boun...@listserver.u2ug.org 
> [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Rick Nuckolls
> Sent: Thursday, May 17, 2012 4:38 PM
> To: 'U2 Users List'
> Subject: Re: [U2] SAVING UNIQUE ( multivalued)
> 
> This does present a challenge,
> 
> The following (non-portable solution works)
> :ED VOC MUNIQUE   
>   
> 5 lines long. 
>   
>   
>   
> : P   
>   
> 0001: PA  
>   
> 0002: QSELECT <> * SAVING <>
>   
> 0003: SAVE.LIST UNIQUE
>   
> 0004: sh -c "/usr/bin/sort -uo '&SAVEDLISTS&/UNIQUE' '&SAVEDLISTS&/UNIQUE'"   
>   
> 0005: GET.LIST UNIQUE
> 
> Or, I suppose that one could also
> 
> EDIT.LIST GARBAGE 
>  
> New record.   
>   
>   
>   
> : I   
>   
> 0001= KAJDF;LJASDLF;KJADSL;FKJASDL;FJKASLD;JFALS;DJFLASKDF
>   
> 0002= 
>   
> Bottom at line 1. 
>   
> : 
>   
> Top.  
>   
> : FI  
>   
> "GARBAGE" filed in file "&SAVEDLISTS&".   
>   
> :GET.LIST GARBAGE TO 1
>   
>   
>   
> 1 record(s) selected to SELECT list #1.   
>   
> :QSELECT IU * SAVING 19   
>   
>   
>   
> 32987 record(s) selected to SELECT list #0.   
>   
> ::MERGE.LIST 0 DIFF 1 
>   
>   
>   
> 90 record(s) selected to SELECT list #0.  
>   
> ::  
> 
> 
> Be nice if there was MV support of 'SAVING UNIQUE', or a cleaner syntactic 
> way to use MERGE.LIST to dedupe.
> 
> -Rick
> 
> 
> 
> -Original Message-
> From: u2-users-boun...@listserver.u2ug.org 
> [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Chris Austin
> Sent: Thursday, May 17, 2012 1:20 PM
> To: u2-users@listserver.u2ug.org
> Subject: Re: [U2] SAVING UNIQUE ( multivalued)
> 
> 
> I usually get my exploded list and then DEDUPE using the following:
> 
> LOCATE  VALUE.TO.FIND IN UNIQUE.LIST BY "AL" SETTING POS ELSE
>  UNIQUE.LIST = INSERT(UNIQUE.LIST,1,POS,0,VALUE.TO.FIND

Re: [U2] SAVING UNIQUE ( multivalued)

2012-05-17 Thread Chris Austin

That works beautifully George, thanks for the tip! I've never used the 
MERGE.LIST command  before, I assume the line you have

> 0005: MERGE.LIST 1 UNION 1

basically take the list #1 and shakes out the unique values?

Chris


> From: ggal...@wyanokegroup.com
> To: u2-users@listserver.u2ug.org
> Date: Thu, 17 May 2012 15:47:11 -0500
> Subject: Re: [U2] SAVING UNIQUE  ( multivalued)
> 
> What about ...
> 
> : P   
>   
> 0001: PA  
>   
> 0002: QSELECT <> * SAVING <>
>   
> 0003: SAVE.LIST UNIQUE 
> 0004: GET.LIST UNIQUE TO 1
> 0005: MERGE.LIST 1 UNION 1
> 0006: SAVE.LIST UNIQUE
> 0007: GET.LIST UNIQUE
> 
> (The MERGE.LIST will sort and dedupe)
> 
>  
> 0004: sh -c "/usr/bin/sort -uo '&SAVEDLISTS&/UNIQUE' '&SAVEDLISTS&/UNIQUE'"   
>   
> 0005: GET.LIST UNIQUE
> 
> -Original Message-
> From: u2-users-boun...@listserver.u2ug.org 
> [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Rick Nuckolls
> Sent: Thursday, May 17, 2012 4:38 PM
> To: 'U2 Users List'
> Subject: Re: [U2] SAVING UNIQUE ( multivalued)
> 
> This does present a challenge,
> 
> The following (non-portable solution works)
> :ED VOC MUNIQUE   
>   
> 5 lines long. 
>   
>   
>   
> : P   
>   
> 0001: PA  
>   
> 0002: QSELECT <> * SAVING <>
>   
> 0003: SAVE.LIST UNIQUE
>   
> 0004: sh -c "/usr/bin/sort -uo '&SAVEDLISTS&/UNIQUE' '&SAVEDLISTS&/UNIQUE'"   
>   
> 0005: GET.LIST UNIQUE
> 
> Or, I suppose that one could also
> 
> EDIT.LIST GARBAGE 
>  
> New record.   
>   
>   
>   
> : I   
>   
> 0001= KAJDF;LJASDLF;KJADSL;FKJASDL;FJKASLD;JFALS;DJFLASKDF
>   
> 0002= 
>   
> Bottom at line 1. 
>   
> : 
>   
> Top.  
>   
> : FI  
>   
> "GARBAGE" filed in file "&SAVEDLISTS&".   
>   
> :GET.LIST GARBAGE TO 1
>   
>   
>   
> 1 record(s) selected to SELECT list #1.   
>   
> :QSELECT IU * SAVING 19   
>   
>   
>   
> 32987 record(s) selected to SELECT list #0.   
>   
> ::MERGE.LIST 0 DIFF 1 
>   
>   
>   
> 90 record(s) selected to SELECT list #0.  
>   
> ::  
> 
> 
> Be nice if there was MV support of 'SAVING UNIQUE', or a cleaner syntactic 
> way to use MERGE.LIST to dedupe.
> 
> -Rick
> 
> 
> 
> -Original Message-
> From: u2-users-boun...@listserver.u2ug.org 
> [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Chris Austin
> Sent: Thursday, May 17, 2012 1:20 PM
> To: u2-users@listserver.u2ug.org
> Subject: Re: [U2] SAVING UNIQUE ( multivalued)
> 
> 
> I usually get my exploded list and then DEDUPE using the following:
> 
> LOCATE  VALUE.TO.FIND IN UNIQUE.LIST BY "AL" SETTING POS ELSE
>  UNIQUE.LIST = INSERT(UNIQUE.LIST,1,POS,0,VALUE.TO.FIND)
> END
> 
> This puts everything in a nice ARRAY called UNIQUE.LIST, I then can use a FOR 
> loop to loop through as needed.
> 
> Chris
> 
> 
> > To: u2-users@listserver.u2ug.org
> > From: wjhon...@aol.com
> > Date: Thu, 17 May 2012 16:13:31 -0400
> > Subject: Re: [U2] SAVING UNIQUE  ( multivalued)
> > 
> > 
> > You have two issues.
> > One is to create a list from an exploded multi-value
> > The other issue, is to dedupe that list.
> > 
> > Without using something like REFORMAT I don't think you can get the two 
> > issues resolved at once.
> > Qselect does not allow Uni

Re: [U2] SAVING UNIQUE ( multivalued)

2012-05-17 Thread George Gallen
What about ...

: P 
0001: PA
0002: QSELECT <> * SAVING <>  
0003: SAVE.LIST UNIQUE 
0004: GET.LIST UNIQUE TO 1
0005: MERGE.LIST 1 UNION 1
0006: SAVE.LIST UNIQUE
0007: GET.LIST UNIQUE

(The MERGE.LIST will sort and dedupe)

 
0004: sh -c "/usr/bin/sort -uo '&SAVEDLISTS&/UNIQUE' '&SAVEDLISTS&/UNIQUE'" 
0005: GET.LIST UNIQUE

-Original Message-
From: u2-users-boun...@listserver.u2ug.org 
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Rick Nuckolls
Sent: Thursday, May 17, 2012 4:38 PM
To: 'U2 Users List'
Subject: Re: [U2] SAVING UNIQUE ( multivalued)

This does present a challenge,

The following (non-portable solution works)
:ED VOC MUNIQUE 
5 lines long.   

: P 
0001: PA
0002: QSELECT <> * SAVING <>  
0003: SAVE.LIST UNIQUE  
0004: sh -c "/usr/bin/sort -uo '&SAVEDLISTS&/UNIQUE' '&SAVEDLISTS&/UNIQUE'" 
0005: GET.LIST UNIQUE

Or, I suppose that one could also

EDIT.LIST GARBAGE  
New record. 

: I 
0001= KAJDF;LJASDLF;KJADSL;FKJASDL;FJKASLD;JFALS;DJFLASKDF  
0002=   
Bottom at line 1.   
:   
Top.
: FI
"GARBAGE" filed in file "&SAVEDLISTS&". 
:GET.LIST GARBAGE TO 1  

1 record(s) selected to SELECT list #1. 
:QSELECT IU * SAVING 19 

32987 record(s) selected to SELECT list #0. 
::MERGE.LIST 0 DIFF 1   

90 record(s) selected to SELECT list #0.
::  


Be nice if there was MV support of 'SAVING UNIQUE', or a cleaner syntactic way 
to use MERGE.LIST to dedupe.

-Rick



-Original Message-
From: u2-users-boun...@listserver.u2ug.org 
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Chris Austin
Sent: Thursday, May 17, 2012 1:20 PM
To: u2-users@listserver.u2ug.org
Subject: Re: [U2] SAVING UNIQUE ( multivalued)


I usually get my exploded list and then DEDUPE using the following:

LOCATE  VALUE.TO.FIND IN UNIQUE.LIST BY "AL" SETTING POS ELSE
 UNIQUE.LIST = INSERT(UNIQUE.LIST,1,POS,0,VALUE.TO.FIND)
END

This puts everything in a nice ARRAY called UNIQUE.LIST, I then can use a FOR 
loop to loop through as needed.

Chris


> To: u2-users@listserver.u2ug.org
> From: wjhon...@aol.com
> Date: Thu, 17 May 2012 16:13:31 -0400
> Subject: Re: [U2] SAVING UNIQUE  ( multivalued)
> 
> 
> You have two issues.
> One is to create a list from an exploded multi-value
> The other issue, is to dedupe that list.
> 
> Without using something like REFORMAT I don't think you can get the two 
> issues resolved at once.
> Qselect does not allow Unique
> So
> QSELECT MYFILE SAVING 2
> will explode the multi-values, but it won't dedupe them.
> 
> 
> 
> -Original Message-
> From: Rick Nuckolls 
> To: 'U2 Users List' 
> Sent: Thu, May 17, 2012 1:06 pm
> Subject: [U2] SAVING UNIQUE ( multivalued)
> 
> 
> Does anyone know a trick to achieve the equivalent of
> SELECT filename SAVING UNIQUE fieldname
> When "fieldname" is the name of a multivalued field, and I want a list  of 
> all 
> he unique values for that field?
> The syntax above does not explode the values, but just looks at the whole 
> field.
> I suppose that I can do a LIST with a BY.EXP & a BREAK.ON, but perhaps I am 
> issing something...
> Thanks,
> Rick Nucko

Re: [U2] SAVING UNIQUE ( multivalued)

2012-05-17 Thread Chris Austin

What's the syntax to use MUNIQUE below in a SELECT?


The following (non-portable solution works)
:ED VOC MUNIQUE 
5 lines long.   

: P 
0001: PA
0002: QSELECT <> * SAVING <>  
0003: SAVE.LIST UNIQUE  
0004: sh -c "/usr/bin/sort -uo '&SAVEDLISTS&/UNIQUE' '&SAVEDLISTS&/UNIQUE'" 
0005: GET.LIST UNIQUE

> From: r...@lynden.com
> To: u2-users@listserver.u2ug.org
> Date: Thu, 17 May 2012 13:37:33 -0700
> Subject: Re: [U2] SAVING UNIQUE  ( multivalued)
> 
> This does present a challenge,
> 
> The following (non-portable solution works)
> :ED VOC MUNIQUE   
>   
> 5 lines long. 
>   
>   
>   
> : P   
>   
> 0001: PA  
>   
> 0002: QSELECT <> * SAVING <>
>   
> 0003: SAVE.LIST UNIQUE
>   
> 0004: sh -c "/usr/bin/sort -uo '&SAVEDLISTS&/UNIQUE' '&SAVEDLISTS&/UNIQUE'"   
>   
> 0005: GET.LIST UNIQUE
> 
> Or, I suppose that one could also
> 
> EDIT.LIST GARBAGE 
>  
> New record.   
>   
>   
>   
> : I   
>   
> 0001= KAJDF;LJASDLF;KJADSL;FKJASDL;FJKASLD;JFALS;DJFLASKDF
>   
> 0002= 
>   
> Bottom at line 1. 
>   
> : 
>   
> Top.  
>   
> : FI  
>   
> "GARBAGE" filed in file "&SAVEDLISTS&".   
>   
> :GET.LIST GARBAGE TO 1
>   
>   
>   
> 1 record(s) selected to SELECT list #1.   
>   
> :QSELECT IU * SAVING 19   
>   
>   
>   
> 32987 record(s) selected to SELECT list #0.   
>   
> ::MERGE.LIST 0 DIFF 1 
>   
>   
>   
> 90 record(s) selected to SELECT list #0.  
>   
> ::  
> 
> 
> Be nice if there was MV support of 'SAVING UNIQUE', or a cleaner syntactic 
> way to use MERGE.LIST to dedupe.
> 
> -Rick
> 
> 
> 
> -Original Message-
> From: u2-users-boun...@listserver.u2ug.org 
> [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Chris Austin
> Sent: Thursday, May 17, 2012 1:20 PM
> To: u2-users@listserver.u2ug.org
> Subject: Re: [U2] SAVING UNIQUE ( multivalued)
> 
> 
> I usually get my exploded list and then DEDUPE using the following:
> 
> LOCATE  VALUE.TO.FIND IN UNIQUE.LIST BY "AL" SETTING POS ELSE
>  UNIQUE.LIST = INSERT(UNIQUE.LIST,1,POS,0,VALUE.TO.FIND)
> END
> 
> This puts everything in a nice ARRAY called UNIQUE.LIST, I then can use a FOR 
> loop to loop through as needed.
> 
> Chris
> 
> 
> > To: u2-users@listserver.u2ug.org
> > From: wjhon...@aol.com
> > Date: Thu, 17 May 2012 16:13:31 -0400
> > Subject: Re: [U2] SAVING UNIQUE  ( multivalued)
> > 
> > 
> > You have two issues.
> > One is to create a list from an exploded multi-value
> > The other issue, is to dedupe that list.
> > 
> > Without using something like REFORMAT I don't think you can get the two 
> > issues resolved at once.
> > Qselect does not allow Unique
> > So
> > QSELECT MYFILE SAVING 2
> > will explode the multi-values, but it won't dedupe them.
> > 
> > 
> > 
> > -Original Message-
> > From: Rick Nuckolls 
> > To: 'U2 Users List' 
> > Sent: Thu, May 17, 2012 1:06 pm
> > Subject: [U2] SAVING UNIQUE ( multivalued)
> > 
> > 
> > Does anyone know a trick to achieve the equivalent of
> > SELECT fil

Re: [U2] SAVING UNIQUE ( multivalued)

2012-05-17 Thread Rick Nuckolls
This does present a challenge,

The following (non-portable solution works)
:ED VOC MUNIQUE 
5 lines long.   

: P 
0001: PA
0002: QSELECT <> * SAVING <>  
0003: SAVE.LIST UNIQUE  
0004: sh -c "/usr/bin/sort -uo '&SAVEDLISTS&/UNIQUE' '&SAVEDLISTS&/UNIQUE'" 
0005: GET.LIST UNIQUE

Or, I suppose that one could also

EDIT.LIST GARBAGE  
New record. 

: I 
0001= KAJDF;LJASDLF;KJADSL;FKJASDL;FJKASLD;JFALS;DJFLASKDF  
0002=   
Bottom at line 1.   
:   
Top.
: FI
"GARBAGE" filed in file "&SAVEDLISTS&". 
:GET.LIST GARBAGE TO 1  

1 record(s) selected to SELECT list #1. 
:QSELECT IU * SAVING 19 

32987 record(s) selected to SELECT list #0. 
::MERGE.LIST 0 DIFF 1   

90 record(s) selected to SELECT list #0.
::  


Be nice if there was MV support of 'SAVING UNIQUE', or a cleaner syntactic way 
to use MERGE.LIST to dedupe.

-Rick



-Original Message-
From: u2-users-boun...@listserver.u2ug.org 
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Chris Austin
Sent: Thursday, May 17, 2012 1:20 PM
To: u2-users@listserver.u2ug.org
Subject: Re: [U2] SAVING UNIQUE ( multivalued)


I usually get my exploded list and then DEDUPE using the following:

LOCATE  VALUE.TO.FIND IN UNIQUE.LIST BY "AL" SETTING POS ELSE
 UNIQUE.LIST = INSERT(UNIQUE.LIST,1,POS,0,VALUE.TO.FIND)
END

This puts everything in a nice ARRAY called UNIQUE.LIST, I then can use a FOR 
loop to loop through as needed.

Chris


> To: u2-users@listserver.u2ug.org
> From: wjhon...@aol.com
> Date: Thu, 17 May 2012 16:13:31 -0400
> Subject: Re: [U2] SAVING UNIQUE  ( multivalued)
> 
> 
> You have two issues.
> One is to create a list from an exploded multi-value
> The other issue, is to dedupe that list.
> 
> Without using something like REFORMAT I don't think you can get the two 
> issues resolved at once.
> Qselect does not allow Unique
> So
> QSELECT MYFILE SAVING 2
> will explode the multi-values, but it won't dedupe them.
> 
> 
> 
> -Original Message-
> From: Rick Nuckolls 
> To: 'U2 Users List' 
> Sent: Thu, May 17, 2012 1:06 pm
> Subject: [U2] SAVING UNIQUE ( multivalued)
> 
> 
> Does anyone know a trick to achieve the equivalent of
> SELECT filename SAVING UNIQUE fieldname
> When "fieldname" is the name of a multivalued field, and I want a list  of 
> all 
> he unique values for that field?
> The syntax above does not explode the values, but just looks at the whole 
> field.
> I suppose that I can do a LIST with a BY.EXP & a BREAK.ON, but perhaps I am 
> issing something...
> Thanks,
> Rick Nuckolls
> ynden Inc.
> 
> __
> 2-Users mailing list
> 2-us...@listserver.u2ug.org
> ttp://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
___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users


Re: [U2] SAVING UNIQUE ( multivalued)

2012-05-17 Thread Chris Austin

I usually get my exploded list and then DEDUPE using the following:

LOCATE  VALUE.TO.FIND IN UNIQUE.LIST BY "AL" SETTING POS ELSE
 UNIQUE.LIST = INSERT(UNIQUE.LIST,1,POS,0,VALUE.TO.FIND)
END

This puts everything in a nice ARRAY called UNIQUE.LIST, I then can use a FOR 
loop to loop through as needed.

Chris


> To: u2-users@listserver.u2ug.org
> From: wjhon...@aol.com
> Date: Thu, 17 May 2012 16:13:31 -0400
> Subject: Re: [U2] SAVING UNIQUE  ( multivalued)
> 
> 
> You have two issues.
> One is to create a list from an exploded multi-value
> The other issue, is to dedupe that list.
> 
> Without using something like REFORMAT I don't think you can get the two 
> issues resolved at once.
> Qselect does not allow Unique
> So
> QSELECT MYFILE SAVING 2
> will explode the multi-values, but it won't dedupe them.
> 
> 
> 
> -Original Message-
> From: Rick Nuckolls 
> To: 'U2 Users List' 
> Sent: Thu, May 17, 2012 1:06 pm
> Subject: [U2] SAVING UNIQUE ( multivalued)
> 
> 
> Does anyone know a trick to achieve the equivalent of
> SELECT filename SAVING UNIQUE fieldname
> When "fieldname" is the name of a multivalued field, and I want a list  of 
> all 
> he unique values for that field?
> The syntax above does not explode the values, but just looks at the whole 
> field.
> I suppose that I can do a LIST with a BY.EXP & a BREAK.ON, but perhaps I am 
> issing something...
> Thanks,
> Rick Nuckolls
> ynden Inc.
> 
> __
> 2-Users mailing list
> 2-us...@listserver.u2ug.org
> ttp://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


Re: [U2] SAVING UNIQUE ( multivalued)

2012-05-17 Thread Wjhonson

You have two issues.
One is to create a list from an exploded multi-value
The other issue, is to dedupe that list.

Without using something like REFORMAT I don't think you can get the two issues 
resolved at once.
Qselect does not allow Unique
So
QSELECT MYFILE SAVING 2
will explode the multi-values, but it won't dedupe them.



-Original Message-
From: Rick Nuckolls 
To: 'U2 Users List' 
Sent: Thu, May 17, 2012 1:06 pm
Subject: [U2] SAVING UNIQUE ( multivalued)


Does anyone know a trick to achieve the equivalent of
SELECT filename SAVING UNIQUE fieldname
When "fieldname" is the name of a multivalued field, and I want a list  of all 
he unique values for that field?
The syntax above does not explode the values, but just looks at the whole field.
I suppose that I can do a LIST with a BY.EXP & a BREAK.ON, but perhaps I am 
issing something...
Thanks,
Rick Nuckolls
ynden Inc.

__
2-Users mailing list
2-us...@listserver.u2ug.org
ttp://listserver.u2ug.org/mailman/listinfo/u2-users

___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users


Re: [U2] SAVING UNIQUE ( multivalued)

2012-05-17 Thread Rick Nuckolls
QSELECT ...SAVING... evidently does not allow UNIQUE...   (Universe)

Still, it looked hopeful.

-Rick 

-Original Message-
From: u2-users-boun...@listserver.u2ug.org 
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Chris Austin
Sent: Thursday, May 17, 2012 12:56 PM
To: u2-users@listserver.u2ug.org
Subject: Re: [U2] SAVING UNIQUE ( multivalued)


I found an old post that seemed to address this:


To do a SAVING UNIQUE with a mulit-valued field, you have to use
QSELECT and the field has to be an attribute number, not a dictionary name

Ex.

GET.LIST WORKING.IMOD.6 TO 1
QSELECT ADDRESS WITH ADDRESS.CHANGE.DATE GE ':X.CHG.DATE:' SAVING UNIQUE 4
SAVE.LIST GET.IMOD.ADDRESS
...

George

> From: r...@lynden.com
> To: u2-users@listserver.u2ug.org
> Date: Thu, 17 May 2012 12:39:09 -0700
> Subject: [U2] SAVING UNIQUE  ( multivalued)
> 
> Does anyone know a trick to achieve the equivalent of
> 
> SELECT filename SAVING UNIQUE fieldname
> 
> When "fieldname" is the name of a multivalued field, and I want a list  of 
> all the unique values for that field?
> 
> The syntax above does not explode the values, but just looks at the whole 
> field.
> 
> I suppose that I can do a LIST with a BY.EXP & a BREAK.ON, but perhaps I am 
> missing something...
> 
> Thanks,
> 
> Rick Nuckolls
> Lynden Inc.
> 
> 
> ___
> 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


Re: [U2] SAVING UNIQUE ( multivalued)

2012-05-17 Thread Chris Austin

I found an old post that seemed to address this:


To do a SAVING UNIQUE with a mulit-valued field, you have to use
QSELECT and the field has to be an attribute number, not a dictionary name

Ex.

GET.LIST WORKING.IMOD.6 TO 1
QSELECT ADDRESS WITH ADDRESS.CHANGE.DATE GE ':X.CHG.DATE:' SAVING UNIQUE 4
SAVE.LIST GET.IMOD.ADDRESS
...

George

> From: r...@lynden.com
> To: u2-users@listserver.u2ug.org
> Date: Thu, 17 May 2012 12:39:09 -0700
> Subject: [U2] SAVING UNIQUE  ( multivalued)
> 
> Does anyone know a trick to achieve the equivalent of
> 
> SELECT filename SAVING UNIQUE fieldname
> 
> When "fieldname" is the name of a multivalued field, and I want a list  of 
> all the unique values for that field?
> 
> The syntax above does not explode the values, but just looks at the whole 
> field.
> 
> I suppose that I can do a LIST with a BY.EXP & a BREAK.ON, but perhaps I am 
> missing something...
> 
> Thanks,
> 
> Rick Nuckolls
> Lynden Inc.
> 
> 
> ___
> 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


Re: [U2] SAVING UNIQUE ( multivalued)

2012-05-17 Thread David L. Wasylenko
... Assuming universe ...

Check 'SYS.HELP SELECT'

QUOTE:


 SAVING  Specifies that the list be made up of field values
 instead  of record IDs. Do not use a SAVING clause
 on multivalued fields.



... david ...

David L. Wasylenko
President, Pick Professionals, Inc
w) 314 558 1482
d...@pickpro.com


-Original Message-
From: u2-users-boun...@listserver.u2ug.org 
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Rick Nuckolls
Sent: Thursday, May 17, 2012 2:39 PM
To: 'U2 Users List'
Subject: [U2] SAVING UNIQUE ( multivalued)

Does anyone know a trick to achieve the equivalent of

SELECT filename SAVING UNIQUE fieldname

When "fieldname" is the name of a multivalued field, and I want a list  of all 
the unique values for that field?

The syntax above does not explode the values, but just looks at the whole field.

I suppose that I can do a LIST with a BY.EXP & a BREAK.ON, but perhaps I am 
missing something...

Thanks,

Rick Nuckolls
Lynden Inc.


___
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] SAVING UNIQUE ( multivalued)

2012-05-17 Thread Rick Nuckolls
Does anyone know a trick to achieve the equivalent of

SELECT filename SAVING UNIQUE fieldname

When "fieldname" is the name of a multivalued field, and I want a list  of all 
the unique values for that field?

The syntax above does not explode the values, but just looks at the whole field.

I suppose that I can do a LIST with a BY.EXP & a BREAK.ON, but perhaps I am 
missing something...

Thanks,

Rick Nuckolls
Lynden Inc.


___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users


Re: [U2] Serial to Ethernet device from Mettler Scale to Unidata/Universe

2012-05-17 Thread warossi

I use a posh manufacturing mr4 keyboard decoder to connect scales to a  thin
client running a terminal emulator.  it functions as a keyboard wedge. We
have used them for 10 years with no problems.

Bill

George Hammerle wrote:
> 
> Hello,
> 
> Has anyone used a "Serial to Ethernet" Device between a Mettler
> Scale ( PS60 ) and their Unidata / Universe System? We are running Unidata
> on a Unix machine. What I would like to do is network a scale in our
> receiving department. The "Serial to Ethernet" device would be set up as a
> server. The Unidata Unix machine would connect via a socket to the "Serial
> to Ethernet" device, pass "W*" to the Mettler Scale ( "give me the weight"
> ), the scale would then pass back the weight through the "Serial to
> Ethernet" device.
> 
> If someone has done this and can provide any feedback, that would be
> spectacular. And if you know of a serial to Ethernet device that works
> well, please let me know.
> 
> 
> George Hammerle
> zhammerle@hubertREMOVE_THIS.com
> 
> 
> 
> 
> 
> 
> 
> 
> This e-mail and any files transmitted with it are confidential and
> intended
> solely for the use of the individual or company to whom they are
> addressed. If
> you have received this e-mail in error, please notify the sender
> immediately and
> delete this e-mail including all attachments from your system. Thank you
> ___
> U2-Users mailing list
> U2-Users@listserver.u2ug.org
> http://listserver.u2ug.org/mailman/listinfo/u2-users
> 
> 

-- 
View this message in context: 
http://old.nabble.com/Serial-to-Ethernet-device-from-Mettler-Scale-to-Unidata-Universe-tp33794622p33864640.html
Sent from the U2 - Users mailing list archive at Nabble.com.

___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users