<?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: Create a macro variable of the frequency of zeroes in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Create-a-macro-variable-of-the-frequency-of-zeroes/m-p/124312#M25457</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How do you want to calculate the percent? # of 0/Total number?&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc sql;&lt;/P&gt;&lt;P&gt;select sum(var_interest=0)/count(*) into :macro_variable&lt;/P&gt;&lt;P&gt;from have;&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 28 Feb 2013 23:01:17 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2013-02-28T23:01:17Z</dc:date>
    <item>
      <title>Create a macro variable of the frequency of zeroes</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Create-a-macro-variable-of-the-frequency-of-zeroes/m-p/124309#M25454</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Im wondering if it is possible to create a macro variable that creates an output of the frequency of a certain number (zero in this case) using call symput etc.I know how I would do it to get a mean (proc means, then output, then a call symput) but dont know if it is possible for a frequency count&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Feb 2013 20:51:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Create-a-macro-variable-of-the-frequency-of-zeroes/m-p/124309#M25454</guid>
      <dc:creator>Xamius32</dc:creator>
      <dc:date>2013-02-28T20:51:46Z</dc:date>
    </item>
    <item>
      <title>Re: Create a macro variable of the frequency of zeroes</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Create-a-macro-variable-of-the-frequency-of-zeroes/m-p/124310#M25455</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can create a macro of anything...though should you is a different question &lt;img id="smileywink" class="emoticon emoticon-smileywink" src="https://communities.sas.com/i/smilies/16x16_smiley-wink.png" alt="Smiley Wink" title="Smiley Wink" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc sql;&lt;/P&gt;&lt;P&gt;select count(var_interest) into :num_zero&lt;/P&gt;&lt;P&gt;from have&lt;/P&gt;&lt;P&gt;where var_interest=0;&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or you can run proc freq and then a data step or proc sql to create the macro variable.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Feb 2013 20:56:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Create-a-macro-variable-of-the-frequency-of-zeroes/m-p/124310#M25455</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2013-02-28T20:56:23Z</dc:date>
    </item>
    <item>
      <title>Re: Create a macro variable of the frequency of zeroes</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Create-a-macro-variable-of-the-frequency-of-zeroes/m-p/124311#M25456</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks, works great, is there an easy way I can change it from count to a percentage? &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Feb 2013 22:18:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Create-a-macro-variable-of-the-frequency-of-zeroes/m-p/124311#M25456</guid>
      <dc:creator>Xamius32</dc:creator>
      <dc:date>2013-02-28T22:18:03Z</dc:date>
    </item>
    <item>
      <title>Re: Create a macro variable of the frequency of zeroes</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Create-a-macro-variable-of-the-frequency-of-zeroes/m-p/124312#M25457</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How do you want to calculate the percent? # of 0/Total number?&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc sql;&lt;/P&gt;&lt;P&gt;select sum(var_interest=0)/count(*) into :macro_variable&lt;/P&gt;&lt;P&gt;from have;&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Feb 2013 23:01:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Create-a-macro-variable-of-the-frequency-of-zeroes/m-p/124312#M25457</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2013-02-28T23:01:17Z</dc:date>
    </item>
  </channel>
</rss>

