Date: Thu, 4 Feb 2010 13:54:34 -0500
Reply-To: Arthur Tabachneck <art297@NETSCAPE.NET>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Arthur Tabachneck <art297@NETSCAPE.NET>
Subject: Re: problem while calling a macro multipletimes with proc
univariate in it
I agree with Jonathan regarding that the OP probably wanted to include the
value of the macro variable in the var statement. The code works on my
own system, but there is also always the chance that the ending semi-
colons (in the macro calls) are causing his system to miss some of the
runs. Will it work if you try?:
On Thu, 4 Feb 2010 11:10:08 -0500, Jonathan Goldberg
>This only makes sense if the variable xxx2 in the var statement should
>be xxx&i, so it also varies.
>As it is, it should print the results for xxx2 three times. Did it really
>print only once?
>On Tue, 2 Feb 2010 15:43:28 -0800, firstname.lastname@example.org <raghur6@GMAIL.COM>
>>I have been using
>>%macro x(i= );
>>proc univariate data= XXX noprint;
>> var xxx2 ; /*==================SHOULD BE XXX&I================*/
>> output out= xxx&i
>> n=n mean=Mean std=std min=min q1=q1 median=Median
>> q3=Q3 max=Max;
>>proc print data=xxx&I;
>>To my surprise its only printing once . like here it is
>>Printing for i=1
>>Its not at all executing the macro %x(i=2) .
>>What do you think Is the reason.
>>Thanks a lot for your help.