Date: Wed, 26 Mar 2008 22:51:51 -0400
Reply-To: "Howard Schreier <hs AT dc-sug DOT org>"
<schreier.junk.mail@GMAIL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: "Howard Schreier <hs AT dc-sug DOT org>"
<schreier.junk.mail@GMAIL.COM>
Subject: Re: PROC SORT NODUPKEY - highest output dataset
On Wed, 26 Mar 2008 11:42:32 -0400, Stat Guy <statguy1@GMAIL.COM> wrote:
>Hello List,
>
>I have a dataset with 8 variables and about 600 entries and am trying to get
>a table of data without any double entries:
>
>proc sort data=D1 nodupkey;
> by var1;
>proc sort data=D1 nodupkey;
> by var2;
>proc sort data=D1 nodupkey;
> by var3;
>proc sort data=D1 nodupkey;
> by var4;
>proc sort data=D1 nodupkey;
> by var5;
>proc sort data=D1 nodupkey;
> by var6;
>proc sort data=D1 nodupkey;
> by var7;
>proc sort data=D1 nodupkey;
> by var8;
>run;
>Now, obviously, the order in which I do these sorting steps plays a role in
>how many datasets there will be in the output table. There are 8! = 40'320
>possible orders in which to do this, and I want to find the one that yields
>the largest possible output dataset. Is there an elegant way to achieve this
>in SAS?
>
>Thanks
Maybe PROC ASSIGN (SAS/OR)
|