Hi,
I routinely have to send a proc freq result in my email as a report.
The flow is like this:
1. Extract data
2. Do some manipulation
3. Get the proc freq
4. Screenshot proc freq result and paste in the Outlook email
5. Send email
1-3 are already automated. But I still need to manually screenshot it and send the email on a daily basis.
What I wish to do is to fully automate this, if a scheduler is too advance, maybe at least I want to automate 4 and 5.
Any tips and advice on how to do so?
Search on here, this is a common question and there are a multitude of solutions. In general, it's easier to do it as an attachment than as an embedded image, but I think there was this question on this in the last month on here.
EDIT: http://blogs.sas.com/content/sasdummy/2013/07/31/gmail-from-sas-program/
Use ODS PDF for the output, and attach the resulting file to the email.
@t30 wrote:
Unfortunately, can't afford an attachment. The receivers would always prefer an embedded html or image rather than having to click and view the attachment.
Then embed ods html output into the mail like this:
ods _all_ close;
filename mymail email 'recipient@domain.com' subject="Test" content_type='text/html';
ods html file=mymail;
proc print data=sashelp.class;
run;
ods html close;
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
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.