Date: Mon, 14 Sep 2009 08:31:30 -0400
Reply-To: Lou <lpogoda@HOTMAIL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Lou <lpogoda@HOTMAIL.COM>
Organization: A noiseless patient Spider
Subject: Re: call symput puzzle!
You've received two or three valid answers, but I have a question. There's
nothing in the code you posted that shows any need for a macro in the first
place - why not just get rid of the %macro and %mend statements, and the
macro call?
Nothing new below, included for reference only.
"Masoud Pajoh" <mpajoh@ODOT.ORG> wrote in message
news:OF364188F4.00CCA529-ON8625762E.006D26BC-8625762E.006F239B@fd9ns01.okladot.state.ok.us...
> Please tell me why TITLE does not resolve?
> in the following
>
>
> dm 'clear log';
> options nomacrogen nosymbolgen nomlogic nomprint;
> %macro gen;
> data a;
> retain done 0;
> infile "c:\sastextfiles\PerformanceMeasure09.txt"
> truncover end=done;
> input @1 line $char133. @;
> if (indexw(left(line), 'FY') and not done) then do;
> xxx=compbl("Summary for"||line);
> put xxx=;
> call symput("title", xxx);
> call symput("total", compbl("Number of projects
> in"||line));
> done=1;
> end;
> more code ....
> run;
> %mend gen;
>
> %gen;
> title "&title.";
>
> log shows:
> .
> .
> .
> xxx=Summary for FY 2009
>
>
> 359 title "&title.";
> WARNING: Apparent symbolic reference TITLE not resolved.
|