The SAS Output Delivery System and reporting techniques

Multiple output to filename email

Reply
Contributor
Posts: 34

Multiple output to filename email

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;
Super Contributor
Posts: 260

Re: Multiple output to filename email

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
Contributor
Posts: 34

Re: Multiple output to filename email

Perfect, thank you! /jenny
Message was edited by: Jennys at Jun 30, 2006 9:59 AM
Ask a Question
Discussion stats
  • 2 replies
  • 154 views
  • 0 likes
  • 2 in conversation