Hi.
I have a SAS script that is scheduled to run everyday. I want to terminate the script if a certain condition is satisfied. For example, if it's Sunday, I want to kill the execution of the script at a certain point, and nothing after should execute.
%let _weekday = %sysfunc(weekday(today()));
data _null_;
if &_weekday. = 1 then do;
call execute('endsas;');
end;
stop;
run;
Would this work? Would this affect anything in the next day schedule run or will that run again fine and check the condition again?
Do you recommend another, more graceful way?
Thank you.