<?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: PROC FREQ Outputting with a zero count in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/PROC-FREQ-Outputting-with-a-zero-count/m-p/362887#M85783</link>
    <description>&lt;P&gt;Use the SPARSE option on the tables statement:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc freq data=have noprint;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; tables row * col / norow nocol nopercent sparse out=want;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;</description>
    <pubDate>Tue, 30 May 2017 21:17:30 GMT</pubDate>
    <dc:creator>mkeintz</dc:creator>
    <dc:date>2017-05-30T21:17:30Z</dc:date>
    <item>
      <title>PROC FREQ Outputting with a zero count</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-FREQ-Outputting-with-a-zero-count/m-p/362867#M85774</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;How can I leave a zero count when outputting the count from PROC FREQ?&lt;/P&gt;
&lt;P&gt;For example, here is the result from PROC FREQ.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;TABLE style="border-collapse: collapse; width: 144pt;" border="0" width="192" cellspacing="0" cellpadding="0"&gt;&lt;COLGROUP&gt;&lt;COL style="width: 48pt;" span="3" width="64" /&gt; &lt;/COLGROUP&gt;
&lt;TBODY&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD class="xl63" style="height: 15.0pt; width: 48pt;" height="20" width="64"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class="xl63" style="border-left: none; width: 48pt;" width="64"&gt;Yes&lt;/TD&gt;
&lt;TD class="xl63" style="border-left: none; width: 48pt;" width="64"&gt;No&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD class="xl63" style="height: 15.0pt; border-top: none;" height="20"&gt;A&lt;/TD&gt;
&lt;TD class="xl63" style="border-top: none; border-left: none;" align="right"&gt;40&lt;/TD&gt;
&lt;TD class="xl63" style="border-top: none; border-left: none;" align="right"&gt;0&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD class="xl63" style="height: 15.0pt; border-top: none;" height="20"&gt;B&lt;/TD&gt;
&lt;TD class="xl63" style="border-top: none; border-left: none;" align="right"&gt;30&lt;/TD&gt;
&lt;TD class="xl63" style="border-top: none; border-left: none;" align="right"&gt;20&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD class="xl63" style="height: 15.0pt; border-top: none;" height="20"&gt;C&lt;/TD&gt;
&lt;TD class="xl63" style="border-top: none; border-left: none;" align="right"&gt;0&lt;/TD&gt;
&lt;TD class="xl63" style="border-top: none; border-left: none;" align="right"&gt;30&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When I use an OUT option, the output only contains nonzero count (below).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;TABLE style="border-collapse: collapse; width: 144pt;" border="0" width="192" cellspacing="0" cellpadding="0"&gt;&lt;COLGROUP&gt;&lt;COL style="width: 48pt;" span="3" width="64" /&gt; &lt;/COLGROUP&gt;
&lt;TBODY&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD class="xl65" style="height: 15.0pt; width: 48pt;" height="20" width="64"&gt;A&lt;/TD&gt;
&lt;TD class="xl65" style="border-left: none; width: 48pt;" width="64"&gt;Yes&lt;/TD&gt;
&lt;TD class="xl65" style="border-left: none; width: 48pt;" width="64" align="right"&gt;40&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD class="xl65" style="height: 15.0pt; border-top: none;" height="20"&gt;B&lt;/TD&gt;
&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;Yes&lt;/TD&gt;
&lt;TD class="xl65" style="border-top: none; border-left: none;" align="right"&gt;30&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD class="xl65" style="height: 15.0pt; border-top: none;" height="20"&gt;B&lt;/TD&gt;
&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;No&lt;/TD&gt;
&lt;TD class="xl65" style="border-top: none; border-left: none;" align="right"&gt;20&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD class="xl65" style="height: 15.0pt; border-top: none;" height="20"&gt;C&lt;/TD&gt;
&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;No&lt;/TD&gt;
&lt;TD class="xl65" style="border-top: none; border-left: none;" align="right"&gt;
&lt;P&gt;30&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Instead above, I want to have all counts including zeros (below).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;TABLE style="border-collapse: collapse; width: 144pt;" border="0" width="192" cellspacing="0" cellpadding="0"&gt;&lt;COLGROUP&gt;&lt;COL style="width: 48pt;" span="3" width="64" /&gt; &lt;/COLGROUP&gt;
&lt;TBODY&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD class="xl65" style="height: 15.0pt; width: 48pt;" height="20" width="64"&gt;A&lt;/TD&gt;
&lt;TD class="xl65" style="border-left: none; width: 48pt;" width="64"&gt;Yes&lt;/TD&gt;
&lt;TD class="xl65" style="border-left: none; width: 48pt;" width="64" align="right"&gt;40&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD class="xl65" style="height: 15.0pt; border-top: none;" height="20"&gt;A&lt;/TD&gt;
&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;No&lt;/TD&gt;
&lt;TD class="xl65" style="border-top: none; border-left: none;" align="right"&gt;0&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD class="xl65" style="height: 15.0pt; border-top: none;" height="20"&gt;B&lt;/TD&gt;
&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;Yes&lt;/TD&gt;
&lt;TD class="xl65" style="border-top: none; border-left: none;" align="right"&gt;30&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD class="xl65" style="height: 15.0pt; border-top: none;" height="20"&gt;B&lt;/TD&gt;
&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;No&lt;/TD&gt;
&lt;TD class="xl65" style="border-top: none; border-left: none;" align="right"&gt;20&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD class="xl65" style="height: 15.0pt; border-top: none;" height="20"&gt;C&lt;/TD&gt;
&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;Yes&lt;/TD&gt;
&lt;TD class="xl65" style="border-top: none; border-left: none;" align="right"&gt;0&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD class="xl65" style="height: 15.0pt; border-top: none;" height="20"&gt;C&lt;/TD&gt;
&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;No&lt;/TD&gt;
&lt;TD class="xl65" style="border-top: none; border-left: none;" align="right"&gt;30&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can anyone help on this?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 30 May 2017 20:42:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-FREQ-Outputting-with-a-zero-count/m-p/362867#M85774</guid>
      <dc:creator>momi</dc:creator>
      <dc:date>2017-05-30T20:42:18Z</dc:date>
    </item>
    <item>
      <title>Re: PROC FREQ Outputting with a zero count</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-FREQ-Outputting-with-a-zero-count/m-p/362887#M85783</link>
      <description>&lt;P&gt;Use the SPARSE option on the tables statement:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc freq data=have noprint;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; tables row * col / norow nocol nopercent sparse out=want;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;</description>
      <pubDate>Tue, 30 May 2017 21:17:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-FREQ-Outputting-with-a-zero-count/m-p/362887#M85783</guid>
      <dc:creator>mkeintz</dc:creator>
      <dc:date>2017-05-30T21:17:30Z</dc:date>
    </item>
    <item>
      <title>Re: PROC FREQ Outputting with a zero count</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-FREQ-Outputting-with-a-zero-count/m-p/363092#M85886</link>
      <description>&lt;P&gt;The SPARSE option works!&lt;/P&gt;
&lt;P&gt;Thanks!!&lt;/P&gt;</description>
      <pubDate>Wed, 31 May 2017 14:36:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-FREQ-Outputting-with-a-zero-count/m-p/363092#M85886</guid>
      <dc:creator>momi</dc:creator>
      <dc:date>2017-05-31T14:36:22Z</dc:date>
    </item>
  </channel>
</rss>

