I am trying to paste a table in my mail body. However I can't create an ods output first. my code is
%let mail=deepankar.srigyan@shopdirect.com;
ods select none;
/*ods select all;-can't use this */
data table2;
input conversion_date :date7. rate;
format conversion_date date9.;
datalines;
01Jan17 110
15Jul17 96
06Mar18 104
;
filename temp email to=(&mail.)
subject="sas forecasting | data prep | report| Daily file transfer summary"
type="text/html";
ods html body=temp
style = Listing;
/* proc print data=table2;*/
/* run;*/
proc report data=table2;
run;
ods html close;
just to note I can't do "ods select all" as this is not supported in my production environement. So is there any way I can paste the table in my mail body without changing the ods option here.
Here's a basic example that I use for various emails:
filename mailbox email
subject="Test sashelp.class"
to=("deepankar.srigyan@shopdirect.com")
type="text/html";
ods listing close;
ods MSOffice2K body=mailbox style=Listing;
proc print data=sashelp.class;
run;
ods _all_ close;
ods listing;
Here's a basic example that I use for various emails:
filename mailbox email
subject="Test sashelp.class"
to=("deepankar.srigyan@shopdirect.com")
type="text/html";
ods listing close;
ods MSOffice2K body=mailbox style=Listing;
proc print data=sashelp.class;
run;
ods _all_ close;
ods listing;
It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.
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.