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 <r...@lynden.com>
> To: 'U2 Users List' <u2-users@listserver.u2ug.org>
> 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

Reply via email to