Date: Wed, 25 Apr 2001 15:06:53 EDT
Reply-To: nnair@acf.dhhs.gov
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Neal K Nair <nnair@ACF.DHHS.GOV>
Subject: Re: Resolution of Macro variable.
Content-type: text/plain; charset=us-ascii
It seems that the &cnty resolves to &n. On the other hand, &&cnty will
resolve to n - if that is what is needed here.
---------- Original Text ----------
From: "Xiaoyuan" <zhux@FLCOURTS.ORG>, on 4/25/01 2:17 PM:
To: SMTP@Public.11@ACF.WDC[<SAS-L@LISTSERV.UGA.EDU>]
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