Hello - hope everyone is ok.
I am running the code below and kept getting the 'ERROR' email. I've checked the previous data steps and found no errors. Does anybody have an idea what I am missing? Thanks a lot!
%if &syscc=0 %then %do;
proc export data=ReportData
dbms=xlsx
replace
outfile='\\drive\Daily_Reporting\Report Name';
sheet='Data';
run;
filename mymail email '[email protected]'
from='[email protected]'
subject='Report Name'
attach=("\\drive\Daily_Reporting\Report Name'" content_type="appication/xlsx");
data _null_;
file mymail
to=(
'[email protected]'
)
cc=('[email protected]');
run;
%end;
%else %do;
filename mymail email '[email protected]'
from='[email protected]'
subject='Report Name';
data _null_;
file mymail
to=('[email protected]');
put "ERROR :(";
run;
%end;