BookmarkSubscribeRSS Feed
BrahmanandaRao
Lapis Lazuli | Level 10
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

 

 

 

1 REPLY 1
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
  • 1 reply
  • 627 views
  • 0 likes
  • 2 in conversation