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

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 1137 views
  • 0 likes
  • 2 in conversation