Hi, i need to take backup for SAS dataset in one SAS DI job only on sunday's.i was trying below code but not working.please help or kindly suggest if you have any other best suggestions please.getting error as below.but the below code is not running by checking the condition,it is just running irrespective of condition.please help 21 %if %eval(&day = 01) %then %do; ERROR: The %IF statement is not valid in open code. 22 data work.&source_table._&date1; 23 24 set &_input1; 25 26 %end; ERROR: The %END statement is not valid in open code. %let _input1=sashelp.cars;
%let source_table=cars;
%let date1 = %sysfunc(putn(%sysfunc(date()), yymmddn8.));
data _null_ ;
call symput('day', put(weekday(today()),z2.));
run;
%if %eval(&day = 01) %then %do;
data work.&source_table._&date1;
set &_input1;
run;
... View more