| Date: | Thu, 13 Nov 2008 19:53:43 -0800 |
| Reply-To: | adjgiulio <adjgiulioNOMONDEZPLEASE@TISCALI.IT> |
| Sender: | "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU> |
| From: | adjgiulio <adjgiulioNOMONDEZPLEASE@TISCALI.IT> |
| Organization: | Aioe.org NNTP Server |
| Subject: | %STR(/)%STR(*) |
|
| Content-Type: | text/plain; format=flowed; charset="iso-8859-1";
reply-type=original |
I was trying to use macro variables to comment out pieces of code. For
example, say I've a program and I need to run most of it 100% of times, but
a specific proc print only on certain occasions (let's assume this decision
is not data driven).
The idea is to create a macro variable at the beginning of my program. I'd
set it to null when I want to run the proc print, and I'd set it to /* when
I want to comment out proc print.
I experimented a bit but I couldn't come up with a satisfactory solution.
Here's an example of what I thought could work but it didn't.
%LET exclude=%STR(/)%STR(*);
&exclude proc print data=dataset;
run;
A %PUT correctly resolves the macro variable to /*. However it doesn't work
with my proc. Shouldn't the macro resolve to /* and comment out proc print?
Thanks,
G
|