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 (May 1996, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Wed, 22 May 1996 09:58:42 -0600
Reply-To:     carl sorenson <sorenson_c@WIZARD.COLORADO.EDU>
Sender:       "SAS(r) Discussion" <SAS-L@UGA.CC.UGA.EDU>
From:         carl sorenson <sorenson_c@WIZARD.COLORADO.EDU>
Organization: university of colorado, irm
Subject:      Re: Help for SAS Programming

try

proc sql; select sum(x) from sasdsnin ; quit;

or, if you need a running total in a data step, simply

data sasout; set sasdsnin; y+x; /* y gets your running total, x is your 1st column */ run;

Carl Sorenson

Chien-Hua Wu wrote: > > Is that possible to sum of all preveious observations by using SAS? The > data set will be look as following. > > x1 x1 > x2 x1+x2 > x3 x1+x2+x3 > . . > . . > . . > xn x1+x2+x3+...+xn > > Thanks for any suggestion. > > Jack.


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