Date: Fri, 20 Nov 2009 17:51:56 -0800
Reply-To: Tom Abernathy <tom.abernathy@GMAIL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Tom Abernathy <tom.abernathy@GMAIL.COM>
Subject: Re: Macro question: How to created macro variables from a macro
Content-Type: text/plain; charset=ISO-8859-1
> The one "problem" I did not solve, but rather worked around, was how
> to specify the length of the Statistic
> variable so that when I combine a number of data sets created by
> repeated macro calls this variable does not
> have different lengths.
Add a LENGTH statement BEFORE the assignment statement.
$32 is a good length as this is the limit for a SAS variable name.
DATA WORK.FREQ_&VAR ;
length statistic $32 ;
STATISTIC ="&VAR" ;