Date: Sun, 26 Jun 2011 14:57:00 -0400
Reply-To: bbser 2009 <bbser2009@GMAIL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: bbser 2009 <bbser2009@GMAIL.COM>
Subject: what's wrong with adding %str(,), parmbuff
Content-Type: text/plain; charset="us-ascii"
Greetings!
The code below is supposed to print off two data sets sashelp.buy and
sashelp.air.
But it cannot run smoothly unless getting rid of the two occurrences of
%str(,).
Could you please explain to me what's wrong with adding those %str(,)?
Thank you very much.
Max
(Maaxx)
===============
options mprint mlogic symbolgen;
%macro printz/parmbuff;
%put buff contains: &syspbuff;
%let num=1;
%let dsname=%scan(&syspbuff, &num, %str(,));
%do %while(&dsname ne);
proc print data=sashelp.&dsname (obs=2);
run;
%let num=%eval(&num+1);
%let dsname=%scan(&syspbuff, &num, %str(,));
%end;
%mend printz;
%printz(buy, air)
|