@Srigyan wrote:
I am trying to assign a weekday in a macro variable.I am getting error. Someone please help.
data _null_;
today=date();
day=weekday(today);
call symput('weekday',day);
run;
%put &weekday.;
Your code does NOT cause an ERROR, see the log (Maxim 2):
73 data _null_;
74 today=date();
75 day=weekday(today);
76 call symput('weekday',day);
77 run;
NOTE: Numeric values have been converted to character values at the places given by: (Line):(Column).
76:23
NOTE: Verwendet wurde: DATA statement - (Gesamtverarbeitungszeit):
real time 0.00 seconds
cpu time 0.00 seconds
78
79 %put &weekday.;
4
... View more