04-14-2012 02:32 PM
If that is your whole program it will be created as GLOBAL. Local macro variables only exist while a macro is running.
Note that placing the %LET inside of the code for that data step is confusing for humans. SAS will assign the macro variable while it is compiling the data step. So it would be less confusing to move the %LET statement before the data statement.
04-14-2012 07:44 PM
You can always query sashelp.vmacro if you want to check.
proc print data=sashelp.vmacro;
where scope ne "AUTOMATIC";
04-17-2012 01:53 AM
%put _user_; Check out. OR %symlocal %symglobl .
%macro a; %let class="course_title"; data _null_; set sashelp.cars; run; %put %symlocal(class) %symglobl(class) ; %mend a; %a