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.
|