Date: Fri, 11 Jan 2008 17:35:18 -0500
Reply-To: "Howard Schreier <hs AT dc-sug DOT org>" <nospam@HOWLES.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: "Howard Schreier <hs AT dc-sug DOT org>" <nospam@HOWLES.COM>
Subject: Re: output dataset of successive proc means in macro
On Wed, 9 Jan 2008 23:22:18 GMT, theorbo <reply@TO-GROUP.NFO> wrote:
>Hi. I have a macro that iterates through 20+ datasets created for rolling
>2-week periods. I perform a proc means for each dataset during the macro
>execution. I want to create an output dataset that contains the results of
>all the iterated proc means. For instance, I want a dataset that contains
>the output for the first dataset on the first line, the second output on the
>second line, etc.
>How do I initiate a new dataset so that the macro's successive proc means
>output is written to it (with one observation per dataset)?
>Thanks for any suggestions.
Do the 20+ data sets have the same structure? Why not pour all of the data
into one big data set, with an appropriate categorical variable to
distinguish the 20+ subsets? Then all you have to do in PROC MEANS is add a
simple CLASS statement. This approach will spare you a lot of unnecessary