I am trying to create a macro that will execute other SAS scripts based on a check of the week.
data _null_;
week_num = week(); /*Current week is 31*/
call symput('week_num',week_num);
run;
%macro testmacro(week_num);
%if &week_num. = 31 %then %do;
%put This works;
%end;
%mend testmacro;
%testmacro(%week_num.);
I have used week 31 as an example, since this is the week of posting this question. I keep getting the message: WARNING: Apparent invocation of macro WEEK_NUM not resolved. I do not understand what I am missing to get the macro to be called correctly.