<?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 Re: Printing out percentages in email in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/Printing-out-percentages-in-email/m-p/833919#M35816</link>
    <description>&lt;P&gt;What is the correct format? You didn't tell us.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;However, you can assign whatever format you want in your CALL SYMPUT (which should really be CALL SYMPUTX). For example:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;CALL SYMPUTX('DIF_bullet1', put(DIF_bullet1,yourformatgoeshere.));&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;assuming variable DIF_bullet1 is numeric.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you use the PERCENT. format, you don't even need to append a percent sign later in the PUT statement.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Lastly, may I be so bold as to comment on your choice of words? Here:&lt;/P&gt;
&lt;PRE&gt;As of 15SEP2022, The proportion of beds is 0.0342627711%&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Proportions should NOT have a percent sign afterwards. Percents (which is the proportion times 100) should have a % sign afterwards. And so the sentence should read (I think)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;As of 15SEP2022, The percent of beds is 3.42627711%&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 16 Sep 2022 21:45:11 GMT</pubDate>
    <dc:creator>PaigeMiller</dc:creator>
    <dc:date>2022-09-16T21:45:11Z</dc:date>
    <item>
      <title>Printing out percentages in email</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Printing-out-percentages-in-email/m-p/833915#M35815</link>
      <description>&lt;P&gt;Hi!&lt;/P&gt;&lt;P&gt;I am trying to code an automatic email for a daily report I do. I can get most of it to work, however, I can't seem to get the percentages to print out in the correct format once it is sent out.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please see code below (Please note I redacted sensitive information):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;FONT color="#3366FF"&gt;Data bullet1;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#3366FF"&gt;Set test;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#3366FF"&gt;CALL SYMPUT ('bullet1',prop_new);&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#3366FF"&gt;CALL SYMPUT ('DIF_bullet1', DIF_bullet1);&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#3366FF"&gt;KEEP today_s_date prop_new DIF_bullet1;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#3366FF"&gt;Run;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#3366FF"&gt;OPTIONS EMAILSYS=smtp Emailhost = amail.placeholder.org EMAILPORT=25 EMAILID="s@placeholder.org";&amp;nbsp;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#3366FF"&gt;FILENAME Mailbox EMAIL ATTACH=("T:Filepath");&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#3366FF"&gt;FILENAME Mailbox EMAIL ATTACH=("T:Filepath");&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;FONT color="#3366FF"&gt;Data _NULL_;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#3366FF"&gt;FILE Mailbox TO=('C@placeholder.org')&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#3366FF"&gt;CC=('S@Placeholder.org')&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#3366FF"&gt;SUBJECT="Report &amp;amp;today";&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#3366FF"&gt;PUT "The &amp;amp;today Report.";&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#3366FF"&gt;PUT " "; &lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#3366FF"&gt;PUT "• As of &amp;amp;today, The proportion of beds is &amp;amp;bullet1.% (&amp;amp;DIF_bullet1.% change from the previous day)."; &lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#3366FF"&gt;PUT "• Placeholder.";&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#3366FF"&gt;PUT "• Placeholder."; &lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#3366FF"&gt;PUT "• Placeholder"; &lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#3366FF"&gt;PUT "• Placeholder";&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#3366FF"&gt;PUT "• Placeholder";&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#3366FF"&gt;PUT "• Placeholder.";&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#3366FF"&gt;PUT "• Placeholder";&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#3366FF"&gt;PUT "• Placeholder.";&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#3366FF"&gt;proc printto;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#3366FF"&gt;RUN;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How the email outputs:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#800080"&gt;The 15SEP2022 Report.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;FONT color="#800080"&gt;&amp;nbsp; As of 15SEP2022, The proportion of beds is 0.0342627711% (-0.000806103% change from the previous day).&lt;/FONT&gt;&lt;/LI&gt;&lt;/UL&gt;</description>
      <pubDate>Fri, 16 Sep 2022 21:00:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Printing-out-percentages-in-email/m-p/833915#M35815</guid>
      <dc:creator>scolitti1</dc:creator>
      <dc:date>2022-09-16T21:00:46Z</dc:date>
    </item>
    <item>
      <title>Re: Printing out percentages in email</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Printing-out-percentages-in-email/m-p/833919#M35816</link>
      <description>&lt;P&gt;What is the correct format? You didn't tell us.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;However, you can assign whatever format you want in your CALL SYMPUT (which should really be CALL SYMPUTX). For example:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;CALL SYMPUTX('DIF_bullet1', put(DIF_bullet1,yourformatgoeshere.));&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;assuming variable DIF_bullet1 is numeric.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you use the PERCENT. format, you don't even need to append a percent sign later in the PUT statement.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Lastly, may I be so bold as to comment on your choice of words? Here:&lt;/P&gt;
&lt;PRE&gt;As of 15SEP2022, The proportion of beds is 0.0342627711%&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Proportions should NOT have a percent sign afterwards. Percents (which is the proportion times 100) should have a % sign afterwards. And so the sentence should read (I think)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;As of 15SEP2022, The percent of beds is 3.42627711%&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 16 Sep 2022 21:45:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Printing-out-percentages-in-email/m-p/833919#M35816</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2022-09-16T21:45:11Z</dc:date>
    </item>
  </channel>
</rss>

