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;
Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.
Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.
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.