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 (October 2011, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Thu, 20 Oct 2011 12:26:22 -0700
Reply-To:     Mary Rosenbloom <mary.rosenbloom.sas@GMAIL.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Mary Rosenbloom <mary.rosenbloom.sas@GMAIL.COM>
Subject:      Re: Transposition
Comments: To: Paolo ORIFICI <Orifici@lacaja.com.ar>
In-Reply-To:  <4EA04856020000EB00093EBE@lcl0011.caja.com>
Content-Type: text/plain; charset=ISO-8859-1

proc sort data=revenues; by company; run;

proc transpose data=revenues out=t_revenues; by company ; id year; var revenues; run;

data a (where=(company='A')) b (where=(company='B')) c (where=(company='C')) d (where=(company='D')) e (where=(company='E')); set t_revenues;

run;

On Thu, Oct 20, 2011 at 12:12 PM, Paolo ORIFICI <Orifici@lacaja.com.ar> wrote: > HI, > > I have the following dataset: > > > data revenues; > > input Year $ Company $ > Business $ Revenues ; > > datalines; > 2009 A a 100 > 2009 B a 70 > 2009 C a 30 > 2009 D a 80 > 2009 E a 10 > 2010 A b 50 > 2010 B b 20 > 2010 C b 70 > 2010 D b 90 > 2010 E b 5 > 2011 A c 150 > 2011 B c 110 > 2011 C c 170 > 2011 D c 50 > 2011 E c 30 > ; > run; > > How can I create one dataset for each one of the businesses (ie. dataset a, dataset b dataset c) with the following columns structure: company, 2009,2010,2011. > > Or how can I export to excel and keep the different datasets in different excel sheets. > > Thanks in advance for your help > > Regards, > Paolo > > > > > AVISO DE CONFIDENCIALIDAD Este e-mail contiene informacion confidencial y legalmente protegida. > Esta dirigido solamente al destinatario mencionado en el epigrafe. > Si Ud. recibe este e-mail por error, por favor no lo lea, > copie ni reproduzca de ninguna manera. > Si Ud. no es el destinatario del mensaje, tenga en cuenta que esta > prohibida cualquier divulgacion, copia, distribucion o uso de su > contenido. Por favor responda a este mensaje inmediatamente, > informando al emisor que ha sido erroneamente dirigido > y luego, eliminelo de su sistema. > > Muchas gracias. > > > CONFIDENTIALITY STATEMENT. > > This e-mail transmission contains information that is intended to be confidential > and privileged or otherwise legally exempt from disclosure. It is intended only for > the addressee named above. If you receive this e-mail by mistake, please do not > read, copy or disseminate it in any manner. > If you are not the intended recipient, any disclosure, copying, distribution or use > of the contents of this information is prohibited. > Please reply to the message immediately by informing the sender that the message > was misdirected. After replying, please erase it from your computer system. > > Thank you. >


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