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");
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.