Hi all,
I've been messing around with Macro's and it looks like I'm getting the "expected" output but it's throwing an error.
My expected result is 01NOV2019; which I will then use in reference later with
where date = "&Test"d
Below is what I have thus far, the log is stating the correct output but it's also complaining about an error and my dataset is incomplete.
%let day=%sysfunc(Today(), date9.);
%let Test=%sysfunc(intnx(month,"&day"d,0),date9.);
DATA TEST;
Column = &Test;
RUN;
281884 %let day=%sysfunc(Today(), date9.);
281885 %let Test=%sysfunc(intnx(month,"&day"d,0),date9.);
281886 DATA TEST;
281887 Column = &Test;
NOTE: Line generated by the macro variable "TEST".
1 01NOV2019
-------
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, ^=, |, ||, ~=.
281888 RUN;
... View more