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 (November 2001, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Thu, 15 Nov 2001 13:43:54 -0500
Reply-To:   "Diskin, Dennis" <Dennis.Diskin@PHARMA.COM>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   "Diskin, Dennis" <Dennis.Diskin@PHARMA.COM>
Subject:   Re: trivial question
Comments:   To: shireen p <shireenp@HOTMAIL.COM>
Content-Type:   text/plain

Shireen,

As a general hint: if you have a problem, let us know what it is, not just that your code does not work. That's too vague. Anyone wanting to help you would have to spend too much time just figuring out what it is that "will not work"

FWIW, Dennis Diskin

> -----Original Message----- > From: shireen p [SMTP:shireenp@HOTMAIL.COM] > Sent: Thursday, November 15, 2001 1:01 PM > To: SAS-L@LISTSERV.UGA.EDU > Subject: trivial question > > Hello, > I have a trivial question: > Say I bring to gether about 15 data sets using the 'set' function, and now > I > want to total up values from different data sets, in my case > MPOLp6+MPOLp5+MPOLp4+MPOLp3+MPOLp2+MPOLp1+MPOLp10+MPOLp11+MPOLp12+ > MPOLp13+MPOLp14+MPOLp15. Where MPOLp6 is from dataset lpstd6, MPOLp5 is > from > lpstd5 etc. How can I do it. These statements below will not work. what am > I > doing wrong. Thank you. > Shireen > > data totalpro; > set lpstd6; set lpstd7;set lpstd8;set lpstd9;set lpstd10;set lpstd11;set > lpstd12;set lpstd13; > set lpstd14;set lpstd15;set lpstd1;set lpstd2; set lpstd3;set lpstd4;set > lpstd5; > TPOLp=(MPOLp6+MPOLp5+MPOLp4+MPOLp3+MPOLp2+MPOLp1+MPOLp10+MPOLp11+MPOLp12+M > POLp13+MPOLp14+MPOLp15); > AVGPOLp=TPOLp/15; > proc print data=totalpro; > title 'averages tot'; > run > > Here is an example of one dataset lpstd6 all the other data sets are > similar. > Data lpstd6; > set pstd6 end=eof; > if eof then do; > MPOLp6=POLp6/CPOLp6; MPORLp6=PORLp6/CPORLp6; MPNOLp6=PNOLp6/CPNOLp6; > MPOTp6=POTp6/CPOTp6; MPORTp6=PORTp6/CPORTp6; MPNOTp6=PNOThp6/CPNOTp6; > MPORPp6=PORPp6/CPORPp6; MPNOPp6=PNOPp6/CPNOP > output lpstd6; > end; > proc print data=lpstd6(keep=rep MPOLp6 MPORLp6 MPNOLp6 MPOTp6 MPORTp6 > MPNOTp6 MPORPp6 MPNOPp6); > title'Last Proper large std 6'; > run; > > > _________________________________________________________________ > Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp


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