When I run the following logic, the first table doesn't produce a title, but the second one does.
%macro email;
%if &total_obs>0 %then %do;
data _null_;
call symputx("today",put(today()-1,mmddyy10.));
run;
options EMAILSYS=SMTP EMAILID="xxxx.xxxxx@xxxxxxx.com" EMAILHOST="email.xxxx.com";
FILENAME output EMAIL SUBJECT="ERCOT flow count as of &today."
FROM="xxxx.xxxxx@xxxxxxx.com"
TO=("xxxx.xxxxx@xxxxxxx.com" )
type='text/html'
CT ='text/html';
title;
footnote;
ods html3 (id=mail) body=OUTPUT
style=htmlblue;
ods escapechar='^';
ODS TEXT="^S={font_face='Calibri' font_size=3 fontweight=Medium foreground=black} ";
ODS TEXT="^S={font_face='Calibri' font_size=3 fontweight=Medium foreground=black}Good morning,";
ODS TEXT="^S={font_face='Calibri' font_size=3 fontweight=Medium foreground=black} ";
ODS TEXT="^S={font_face='Calibri' font_size=3 fontweight=Medium foreground=black}See counts below and let me know if you have questions.";
ODS TEXT="^S={font_face='Calibri' font_size=3 fontweight=Medium foreground=black}Attached worksheet for reference. ";
ODS TEXT="^S={font_face='Calibri' font_size=3 fontweight=Medium foreground=black}Thanks,";
ODS TEXT="^S={font_face='Calibri' font_size=3 fontweight=Medium foreground=black}Keegan";
title;
*** New Connects table ***;
proc print data=acq_final noobs
style (table) = [frame=box borderwidth=1 ]
style (data) = {just=c}
style (header) = {just=c};
TITLE "New Connects";
run;
title;
*** All other counts table ***;
proc print data=all_final noobs
style (table) = [frame=box borderwidth=1 ]
style (data) = {just=c}
style (header) = {just=c};
TITLE "Other Flow Counts";
run;
title;
ods html3 (id=mail) close;
%end;
%mend;
%email;
This is the email output:
You'll notice that the title of the second table prints, but not the first. Why is this? What can I do to fix this? @ChrisHemedinger
Thank you for your help!
Keegan
Thank you! This worked. To clarify, this was the updated syntax:
PROC ODSTEXT; p "^S={font_face='Calibri' font_size=3 fontweight=Medium foreground=black} ";
PROC ODSTEXT; p "^S={font_face='Calibri' font_size=3 fontweight=Medium foreground=black}Good morning,";
PROC ODSTEXT; p "^S={font_face='Calibri' font_size=3 fontweight=Medium foreground=black} ";
PROC ODSTEXT; p "^S={font_face='Calibri' font_size=3 fontweight=Medium foreground=black}See counts below and let me know if you have questions.";
PROC ODSTEXT; p "^S={font_face='Calibri' font_size=3 fontweight=Medium foreground=black}Attached worksheet for reference. ";
PROC ODSTEXT; p "^S={font_face='Calibri' font_size=3 fontweight=Medium foreground=black}Thanks,";
PROC ODSTEXT; p "^S={font_face='Calibri' font_size=3 fontweight=Medium foreground=black}Keegan";
Thank you for your help!
Right again!
Thank you so much!
Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!
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.