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 (March 2000, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Tue, 21 Mar 2000 08:11:33 -0800
Reply-To:     dave_h <hapeman@JUNO.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         dave_h <hapeman@JUNO.COM>
Organization: http://www.remarq.com: The World's Usenet/Discussions Start Here
Subject:      Re: Best way to total columns

Proc sql will allow you to do what you want in one step.

proc sql feedback noprint;

create table sum_up as select sum(col1) as sum_1, sum(col2) as sum_2, sum(col3) as sum_3, sum(col4) as sum_4, calculated sum_2/calculated sum_1 as perc_2, calculated sum_3/calculated sum_1 as perc_3, calculated sum_4/calculated sum_1 as perc_4 from inputset;

quit;

inputset is the name of the input data set. This proc will produce a data set sum_up with the seven things you asked for.

Happy coding

dave

* Sent from AltaVista http://www.altavista.com Where you can also find related Web Pages, Images, Audios, Videos, News, and Shopping. Smart is Beautiful


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