<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Title Missing for PROC PRINT table in Email in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Title-Missing-for-PROC-PRINT-table-in-Email/m-p/783473#M249814</link>
    <description>&lt;P&gt;When I run the following logic, the first table doesn't produce a title, but the second one does.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt;%macro email;

%if &amp;amp;total_obs&amp;gt;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 &amp;amp;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;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;This is the email output:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Keegan_1-1638396460753.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/66316iD774008D3E727AD3/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Keegan_1-1638396460753.png" alt="Keegan_1-1638396460753.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;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?&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/4"&gt;@ChrisHemedinger&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for your help!&lt;/P&gt;&lt;P&gt;Keegan&lt;/P&gt;</description>
    <pubDate>Wed, 01 Dec 2021 22:07:49 GMT</pubDate>
    <dc:creator>Keegan</dc:creator>
    <dc:date>2021-12-01T22:07:49Z</dc:date>
    <item>
      <title>Title Missing for PROC PRINT table in Email</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Title-Missing-for-PROC-PRINT-table-in-Email/m-p/783473#M249814</link>
      <description>&lt;P&gt;When I run the following logic, the first table doesn't produce a title, but the second one does.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt;%macro email;

%if &amp;amp;total_obs&amp;gt;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 &amp;amp;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;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;This is the email output:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Keegan_1-1638396460753.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/66316iD774008D3E727AD3/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Keegan_1-1638396460753.png" alt="Keegan_1-1638396460753.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;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?&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/4"&gt;@ChrisHemedinger&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for your help!&lt;/P&gt;&lt;P&gt;Keegan&lt;/P&gt;</description>
      <pubDate>Wed, 01 Dec 2021 22:07:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Title-Missing-for-PROC-PRINT-table-in-Email/m-p/783473#M249814</guid>
      <dc:creator>Keegan</dc:creator>
      <dc:date>2021-12-01T22:07:49Z</dc:date>
    </item>
    <item>
      <title>Re: Title Missing for PROC PRINT table in Email</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Title-Missing-for-PROC-PRINT-table-in-Email/m-p/783515#M249838</link>
      <description>Testing shows it's the interaction between the ODS TEXT statements and TITLE that is causing the issue. If you switch the ODS TEXT statements to PROC ODSTEXT instead it seems to go away. &lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/odsproc/n06rruvsw8xaqnn17cofvmpz7j31.htm" target="_blank"&gt;https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/odsproc/n06rruvsw8xaqnn17cofvmpz7j31.htm&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;No idea why or if this is expected behaviour though.</description>
      <pubDate>Thu, 02 Dec 2021 02:37:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Title-Missing-for-PROC-PRINT-table-in-Email/m-p/783515#M249838</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2021-12-02T02:37:41Z</dc:date>
    </item>
    <item>
      <title>Re: Title Missing for PROC PRINT table in Email</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Title-Missing-for-PROC-PRINT-table-in-Email/m-p/783640#M249932</link>
      <description>&lt;P&gt;Thank you! This worked. To clarify, this was the updated syntax:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt;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";&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Thank you for your help!&lt;/P&gt;</description>
      <pubDate>Thu, 02 Dec 2021 15:04:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Title-Missing-for-PROC-PRINT-table-in-Email/m-p/783640#M249932</guid>
      <dc:creator>Keegan</dc:creator>
      <dc:date>2021-12-02T15:04:28Z</dc:date>
    </item>
    <item>
      <title>Re: Title Missing for PROC PRINT table in Email</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Title-Missing-for-PROC-PRINT-table-in-Email/m-p/783644#M249934</link>
      <description>I think you can use only one PROC ODSTEXT statement, you don't need multiple do you? That's one of the benefits of PROC ODSTEXT, it can do texts/paragraphs etc.</description>
      <pubDate>Thu, 02 Dec 2021 15:11:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Title-Missing-for-PROC-PRINT-table-in-Email/m-p/783644#M249934</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2021-12-02T15:11:48Z</dc:date>
    </item>
    <item>
      <title>Re: Title Missing for PROC PRINT table in Email</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Title-Missing-for-PROC-PRINT-table-in-Email/m-p/783679#M249953</link>
      <description>&lt;P&gt;Right again!&lt;/P&gt;
&lt;P&gt;Thank you so much!&lt;/P&gt;</description>
      <pubDate>Thu, 02 Dec 2021 15:51:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Title-Missing-for-PROC-PRINT-table-in-Email/m-p/783679#M249953</guid>
      <dc:creator>Keegan</dc:creator>
      <dc:date>2021-12-02T15:51:54Z</dc:date>
    </item>
  </channel>
</rss>

