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 protected]')
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 protected]')
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 protected]')
subject="Report for the week of &REPORT_DT." ;
attach=("/data/bi/data/inbox/MTS/&ENAME..csv" content_type="application/xlsx");
CFC_SAS_Communities_400x225.jpg
It's your turn to help shape SAS Innovate 2027. Share your expertise and inspire the SAS community.
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.