Improving Program Efficiency with Macro Variables |
Using Automatic Macro
Variables |
You may have noticed that the FOOTNOTE statement text that includes the
macro variable reference appears in double quotes. Macro variable references
that appear in quoted strings must be enclosed in double
quotes.
title 'Temporary Employees Hired in November'; footnote "Report Run on &sysdate"; data hrd.tempnov; set hrd.temp; if month(begindate)=11; run; proc print data=hrd.tempnov; run; Here's an example. The program below encloses the macro variable reference in single quotes. When you submit the program below, you see an unresolved macro variable reference in the footnote. title 'Temporary Employees Hired in November'; footnote 'Report Run on &sysdate'; data hrd.tempnov; set hrd.temp; if month(begindate)=11; run; proc print data=hrd.tempnov; run; |
|
Copyright © 2002 SAS Institute Inc.,
Cary, NC, USA. All rights reserved.