ods html body='C:\Users\Anand\Desktop\SAS PROJECT\class.html' ;
proc print data=sashelp.class;
title 'ODS html Report';
run;
ods html close;
** Step 2: Use Email Engine to send html file as an attachment;
filename doemail email to=('anandsasjobs@gmail.com' )
from='anandsasjobs@gmail.com'
cc=('anandsasjobs@gmail.com')
subject='Look at this ODS html report'
attach='C:\Users\Anand\Desktop\SAS PROJECT\class.html';
data _null_;
file doemail;
put 'This is a test email with an html attachment.';
run;
288 ods html body='C:\Users\Anand\Desktop\SAS PROJECT\class.html' ;
NOTE: Writing HTML Body file: C:\Users\Anand\Desktop\SAS PROJECT\class.html
289 proc print data=sashelp.class;
290 title 'ODS RTF Report';
291 run;
NOTE: There were 19 observations read from the data set SASHELP.CLASS.
NOTE: PROCEDURE PRINT used (Total process time):
real time 0.23 seconds
cpu time 0.03 seconds
292 ods html close;
293
294 ** Step 2: Use Email Engine to send RTF file as an attachment;
295 filename doemail email to=('anandsasjobs@gmail.com' )
296 from='anandsasjobs@gmail.com'
297 cc=('anandsasjobs@gmail.com')
298 subject='Look at this ODS html report'
299 attach='C:\Users\Anand\Desktop\SAS PROJECT\class.html';
300
301 data _null_;
302 file doemail;
303 put 'This is a test email with an html attachment.';
304 run;
NOTE: The file DOEMAIL is:
E-Mail Access Device
ERROR: Undetermined I/O failure.
NOTE: The SAS System stopped processing this step because of errors.
NOTE: DATA statement used (Total process time):
real time 3.31 seconds
cpu time 0.29 seconds
Plesse post the complete log from all three steps.
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
Still thinking about your presentation idea? The submission deadline has been extended to Friday, Nov. 14, at 11:59 p.m. ET.
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.
Ready to level-up your skills? Choose your own adventure.