Date: Thu, 31 May 2012 10:45:28 -0400
Reply-To: Smile PJ <luxuemei@YAHOO.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Smile PJ <luxuemei@YAHOO.COM>
Subject: reply
Try to use '*' as separator in both places.
proc sql noprint;
select distinct(make), count(distinct make) into:empvar separated
by '*' , :ct from sashelp.cars; quit;
%put &empvar = &ct= &sqlobs = ;
%macro x;
%do i=1 %to &sqlobs ;
%let evar=%scan(&empvar,&i,%str(*));
data x;
set sashelp.cars;
where make="&evar";
run;
ods pdf file="C:/testcars_&evar..pdf";
proc report data=x nowd;
run;
ods pdf close;
%end;
%mend;
%x;
|