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");
Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.
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.
Ready to level-up your skills? Choose your own adventure.