Thanks Tom, I must still be missing something sorry. I have changed the code to: data _null_;
call symput('DateVar', put(sunday, date9.));
run;
%PUT &Sunday.;
Data work.TT_Weekly_report;
Set Data.Employee;
Keep Week_end_dt EVENT_DT Cluster Queue_CD TOTAL_CALLS TALK_TIME MBL;
Where Week_end_dt = "&Sunday."d;
RUN; and I get this error 29 Where Week_end_dt = "&Sunday."d; NOTE: Line generated by the macro variable "SUNDAY". 29 "" 10SEP2017" __ 22 76 ERROR: Syntax error while parsing WHERE clause. ERROR 22-322: Syntax error, expecting one of the following: ;, !, !!, &, *, **, +, -, /, <, <=, <>, =, >, >=, AND, EQ, GE, GT, LE, LT, NE, NOT, OR, ^, ^=, |, ||, ~, ~=. ERROR 76-322: Syntax error, statement will be ignored. Thanks for your help. Dean
... View more