Hi all,
I am struggling to fix this bit of code . Could someone help me please ?
Many thanks in advance.
%let today=%sysfunc(today());
%let currdt=%sysfunc(datetime());
data _null_;
date2=intnx("month",&today.,-1,'end');
put date2=;
call symputx('DATE2',put(&date2. ,date9.));
%put DATE2=&date2.;
month_id = intck('month','01jan1990'd,today());
put month_id=;
call symputx('month_id',month_id);
%put month_id=&month_id.;
run;
LOG FILE:
23 GOPTIONS ACCESSIBLE;
24
25
26 %let today=%sysfunc(today());
27 %let currdt=%sysfunc(datetime());
28 data _null_;
29
30 date2=intnx("month",&today.,-1,'end');
31 put date2=;
32 call symputx('DATE2',put(&date2. ,date9.));
NOTE: Line generated by the macro variable "DATE2".
32 31JAN2020
_______
22
ERROR 22-322: Syntax error, expecting one of the following: !, !!, &, *, **, +, -, /, <, <=, <>, =, >, ><, >=, AND, EQ, GE, GT, IN,
LE, LT, MAX, MIN, NE, NG, NL, NOTIN, OR, ^=, |, ||, ~=.
33 %put DATE2=&date2.;
DATE2=31JAN2020
34
35 month_id = intck('month','01jan1990'd,today());
36 put month_id=;
37 call symputx('month_id',month_id);
38 %put month_id=&month_id.;
month_id=361
39
40 run;