Date: Wed, 2 Dec 2009 16:51:54 -0800
Reply-To: dave crimkey <d_crimkey@YAHOO.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: dave crimkey <d_crimkey@YAHOO.COM>
Subject: Keeping description with code
Content-Type: text/plain; charset=iso-8859-1
I am running a summary and a transpose and two of the variables tie together, i.e., one is a code and the other is a description of the code. I want them both to be together so I've put the description in the ID statement of the proc summary:
Proc Summary data = dataone;
class product classcode cssize catname codenum yearqtr;
id codedesc;
var amt1 amt2 amt3;
output out = datatwo sum=;
run;
Now I want to transpose the results dataset, datatwo so that yearqtr becomes the column variables:
Proc transpose data=datatwo out=datathree prefix = Y;
by product classcode cssize catname codenum ;
id yearqtr;
var amt1 amt2 amt3;
run;
How do I keep the codedesc (the description) with the codenum (code number) without causing duplicate rows?
Thanks,
Dave