Date: Wed, 25 Apr 2001 14:26:09 -0400
Reply-To: "Dezainde, Francois" <francois.dezainde@BELL.CA>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: "Dezainde, Francois" <francois.dezainde@BELL.CA>
Subject: Re: Resolution of Macro variable.
Content-Type: text/plain; charset=ISO-8859-1
On Wed, 25 Apr 2001 14:04:32 -0400, Xiaoyuan <zhux@FLCOURTS.ORG> wrote:
>I work on a huge court data set, and have to produce 670 tables monthly(67
>counties multiply 10 tables). I use "proc printto" to route procedure
>outputs to our server. That's okay. But when I try to seperate those tables
>into 67 files county by county in one folder, the resolution of macro
>variable doesn't work. Here is what I did.
>
>%macro county;
> %do n=1 %to 67;
>%let cnty=&n;
>proc printto print='k:\MasterData\SRS\county\SRSpage1&cnty..rtf';
>run;
>proc print data=county; run;
>proc printto;run;
> %end;
>%mend county;
>%county();
>
>"cnty" cannot be resolved in the above case. Is something wrong? Or macro
>variables cannot be resolved in the path. I appreciate any direction.
>
>Xiaoyuan
Change your code for:
proc printto print="k:\MasterData\SRS\county\SRSpage1&cnty..rtf";
because macro variable are not resolved in single quote.
François Dézainde
|