I have a piece of code that exports and emails the file to a distribution list.
%let subject = Report for the week of &REPORT_DT.;
filename mymail email to=('EMAIL@EMAIL.CA')
subject=%bquote(&subject.)
attach=("/data/bi/data/inbox/MTS/&ENAME..csv" content_type="application/xlsx");
REPORT_DT is just an address created for the reporting data to stamp within the subject line
However this generates an error when I run this.
If I ran it like below it works but I cannot use the REPORT_DT to timestamp the subject line
filename mymail email to=('EMAIL@EMAIL.CA')
subject='TEST Promo Report'
attach=("/data/bi/data/inbox/MTS/&ENAME..csv" content_type="application/xlsx");
Hi,
It would be helpful if you provided the log with the following macro options turned on
options mprint symbolgen ;
At a guess you have some kind of macro variable resolution issue, and I would start with trying this:
options mprint symbolgen ;
%put Report Date : &Report_DT
%let subject = Report for the week of &REPORT_DT.;
%put Subject: &subject ;
filename mymail email to=('EMAIL@EMAIL.CA')
subject="Report for the week of &REPORT_DT." ;
attach=("/data/bi/data/inbox/MTS/&ENAME..csv" content_type="application/xlsx");
Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.
Register today!Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Select SAS Training centers are offering in-person courses. View upcoming courses for: