BookmarkSubscribeRSS Feed
t30
Fluorite | Level 6 t30
Fluorite | Level 6

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?

4 REPLIES 4
Reeza
Super User

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/

t30
Fluorite | Level 6 t30
Fluorite | Level 6
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.
Kurt_Bremser
Super User

@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;

sas-innovate-2024.png

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.

 

Register now!

How to Concatenate Values

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 4 replies
  • 3839 views
  • 0 likes
  • 3 in conversation