Hello! Good morning! Below is the date macros code, that I'm using in my program DATA _NULL_; if "&sysparm" EQ '' THEN DO; call symput('begdate',put(intnx('qtr',TODAY(),-1,'b'),date9.)); call symput('enddate',put(intnx('qtr',TODAY(),-1,'e'),date9.)); END; ELSE DO; call symput('begdate',PUT(input(scan("&sysparm.", 1, ',' ) , mmddyy10.),date9.)); call symput('enddate',PUT(input(scan("&sysparm.", 2, ',' ) , mmddyy10.),date9.)); END; RUN; %put begdate3 : &begdate; begdate3 : 01JAN2019 %put enddate3 : &enddate ; enddate3 : 31MAR2019 While using the macro in the program, I'm getting the below error. rcvd_date>= &begdate. and NOTE: Line generated by the macro variable "BEGDATE". 01JAN2019 _______ 22 76 ERROR 22-322: Syntax error, expecting one of the following: !, !!, &, *, **, +, -, /, <, <=, <>, =, >, >=, AND, EQ, EQT, GE, GET, GROUP, GT, GTT, HAVING, LE, LET, LT, LTT, NE, NET, OR, ORDER, ^=, |, ||, ~=. ERROR 76-322: Syntax error, statement will be ignored. rcvd_date < &enddate. ; NOTE: PROC SQL set option NOEXEC and will continue to check the syntax of statements. Even though macro resolves to the required format, I'm getting the syntax error. Also, please validate if I'm using the right code. Please help me on resolving this. Thanks.
... View more