BookmarkSubscribeRSS Feed
Jennys
Calcite | Level 5
Hi.

I wan´t to send multiple output to an email, with filename email. It seem that every datastep/proc generates a new email. Is there a way to append output to a single email, without using attachments?

Following generates 2 email, one with the text and the other one with graph:

/* -------------------------------------- */

data testdata;
do mid=1 to 5;
resp=RANUNI(0);
output;
end;
run;

filename outbox email
to=to@domail.com'
type='text/html'
subject='churn report in HTML format'
;

data _null_;
file outbox;
put 'Here I will put a html table';
run;

ods html body=outbox
rs=none;
options dev = activex;

proc gchart data = testdata;
vbar mid / discrete SUMVAR=RESP PATTERNID=MIDPOINT;
run;

ods html close;
filename outbox clear;
2 REPLIES 2
Olivier
Pyrite | Level 9
Hi Jenny.

Something you show consider is putting everything into one single ODS HTML ... ODS HTML CLOSE block, even your Data steps.
In your example, it turns into this :

data testdata;
do mid=1 to 5;
resp=RANUNI(0);
output;
end;
run;

filename outbox email
to=to@domail.com'
type='text/html'
subject='churn report in HTML format'
;

ods html body=outbox
rs=none;


data _null_;
file print ;
put 'Here I will put a html table';
run;

options dev = activex;

proc gchart data = testdata;
vbar mid / discrete SUMVAR=RESP
P PATTERNID=MIDPOINT;
run; quit ;

ods html close;
filename outbox clear;

It seems to work on my computer (SAS 9.1.3 SP3). Does it solve your problem ?

Olivier Decourt
Training & consulting on SAS software and statistical topics
France
Jennys
Calcite | Level 5
Perfect, thank you! /jenny
Message was edited by: Jennys at Jun 30, 2006 9:59 AM

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
  • 2 replies
  • 725 views
  • 0 likes
  • 2 in conversation