LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (December 2009, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
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

Back to: Top of message | Previous page | Main SAS-L page