Hi Quentin and Karl,
The following program shows, that macros and macro variables are not
resolved within comments.
Run it once like this and once with an empty macro variable FirstCh.
%LET FirstCh = *;
%MACRO Comment; CALL EXECUTE ('%LET MacroRun=Macro run;'); %MEND Comment;
%LET Comment = CALL EXECUTE ('%LET Resolved=Macro value resolved;')%STR(;);
Regards - Jim.
Y. (Jim) Groeneveld, MSc IMRO TRAMARKO tel. +31 412 407 070
senior statist./data man. P.O. Box 1 fax. +31 412 407 080
J.Groeneveld@ITGroups.com 5350 AA BERGHEM, NL www.imrotramarko.com
My computer does what I tell it to do; sometimes it says my instructions are
Notice of confidentiality: this e-mail may contain confidential information
intended for the addressed recipient only.
If you have received this e-mail in error please delete this e-mail and
please notify the sender so that proper delivery can be arranged.
> -----Original Message-----
> From: Karl K. [mailto:karlstudboy@HOTMAIL.COM]
> Sent: 25 November 2002 14:57
> To: SAS-L@LISTSERV.UGA.EDU
> Subject: Re: macro resolution inside *-comments
> If I'm reading you correctly, I'm not really seeing a "comment". An
> asterisk denotes a comment at the beginning of a STATEMENT, not the
> begining of a line of text. There's no semi-colon after
> "%bad", so the
> next line isn't really a comment.
> (The following code is untested.)
> For example, if we define %bad as something like:
> %macro bad;
> %str(proc freq; table x); *note no semicolon inside the
> %str function;
> Then the SAS code:
> * whatever;
> Resolves to:
> proc freq; table x * whatever;
> Perfectly legal executable code, without any comments, right?
> "* whatever" is part of the table statement in proc freq, not
> a comment.
> If I'm missing your point, my apologies