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 (September 2004, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Fri, 3 Sep 2004 14:15:28 -0600
Reply-To:     Jack Hamilton <JackHamilton@FIRSTHEALTH.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Jack Hamilton <JackHamilton@FIRSTHEALTH.COM>
Subject:      Re: PROC REPORT
Comments: To: JBosch1@PRDUS.JNJ.COM
Content-Type: text/plain; charset=us-ascii

Is this what you want?

===== data a; do i=1 to 10; output; end; run;

proc report data=a nowindows; columns i running_i; define i / display; define running_i / computed;

compute running_i; hold_running_i = sum(hold_running_i, i); running_i = hold_running_i; endcomp;

run; =====

I'm not saying there's not a simpler way.

-- JackHamilton@FirstHealth.com Manager, Technical Development Metrics Department, First Health West Sacramento, California USA

>>> "Bosch, Jules [PRDUS Non J&J]" <JBosch1@PRDUS.JNJ.COM> 09/03/2004 9:45 AM >>> Dears,

The 2nd data step in the following simple code accumulates values as each row is processed.

data a;

do i=1 to 10;

output;

end;

run;

data b; set a;

x+i;

run;

proc print;run;

Is it possible to create a new column that accumulates row values using PROC REPORT on data set A?

TIA,

Jules Bosch


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