<?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: output proc freq percent in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/output-proc-freq-percent/m-p/674379#M203074</link>
    <description>&lt;P&gt;It usually helps to show the code you are using so we can post code suggestions.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Proc freq will create output data sets several ways. One is to add an OUT=datasetname option to the tables statement. would require an OUTPCT option to get the percents. The OUT= option only will have result for a single table request. If you creating multiple tables then you either split the Tables statements or use ODS OUTPUT to capture results. You can use ODS OUTPUT CROSSTABFREQS=datasetname; as a statement in the Proc freq code to capture two-way tables.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This would have all the counts and percents, more less, and if you only want a specific value then you use the typical options to subset a data set.&lt;/P&gt;</description>
    <pubDate>Tue, 04 Aug 2020 14:55:55 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2020-08-04T14:55:55Z</dc:date>
    <item>
      <title>output proc freq percent</title>
      <link>https://communities.sas.com/t5/SAS-Programming/output-proc-freq-percent/m-p/674374#M203070</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have the following proc freq:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;DIV class="branch"&gt;
&lt;DIV align="center"&gt;
&lt;TABLE summary="Page Layout"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD class="c t"&gt;
&lt;DIV align="center"&gt;
&lt;TABLE class="table" summary="Procedure Freq: Cross-Tabular Freq Table" frame="box" rules="all" cellspacing="0" cellpadding="5"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TH class="l t stacked_cell header" scope="col"&gt;
&lt;TABLE border="0" width="100%" cellspacing="0" cellpadding="5"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TH class="l t header top_stacked_value" scope="col"&gt;Frequency&lt;/TH&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="l t header bottom_stacked_value" scope="col"&gt;Col Pct&lt;/TH&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;/TH&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;/DIV&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;DIV align="center"&gt;
&lt;TABLE class="table" summary="Procedure Freq: Cross-Tabular Freq Table" frame="box" rules="all" cellspacing="0" cellpadding="5"&gt;&lt;COLGROUP&gt; &lt;COL /&gt;&lt;/COLGROUP&gt; &lt;COLGROUP&gt; &lt;COL /&gt; &lt;COL /&gt;&lt;/COLGROUP&gt;
&lt;THEAD&gt;
&lt;TR&gt;
&lt;TH class="c header" colspan="3" scope="colgroup" width="246px" height="19px"&gt;Table&amp;nbsp;of&amp;nbsp;x&amp;nbsp;by&amp;nbsp;z&lt;/TH&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="c b header" rowspan="2" scope="col" width="130px" height="37px"&gt;x&lt;/TH&gt;
&lt;TH class="c b header" colspan="2" scope="colgroup" width="116px" height="18px"&gt;z&lt;/TH&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="r header" scope="col" width="64px" height="19px"&gt;Partial&lt;/TH&gt;
&lt;TH class="r header" scope="col" width="52px" height="19px"&gt;Total&lt;/TH&gt;
&lt;/TR&gt;
&lt;/THEAD&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TH class="l t rowheader" scope="row" width="130px" height="64px"&gt;Complete&lt;/TH&gt;
&lt;TD width="64px" height="64px" class="r t stacked_cell data"&gt;
&lt;TABLE border="0" width="100%" cellspacing="0" cellpadding="5"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD class="r t data top_stacked_value"&gt;127&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="r t data bottom_stacked_value"&gt;63.50&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;/TD&gt;
&lt;TD width="52px" height="64px" class="r t stacked_cell data"&gt;
&lt;TABLE border="0" width="100%" cellspacing="0" cellpadding="5"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD class="r t data top_stacked_value"&gt;127&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="r t data bottom_stacked_value"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="l t rowheader" scope="row" width="130px" height="64px"&gt;Other&lt;/TH&gt;
&lt;TD width="64px" height="64px" class="r t stacked_cell data"&gt;
&lt;TABLE border="0" width="100%" cellspacing="0" cellpadding="5"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD class="r t data top_stacked_value"&gt;73&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="r t data bottom_stacked_value"&gt;36.50&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;/TD&gt;
&lt;TD width="52px" height="64px" class="r t stacked_cell data"&gt;
&lt;TABLE border="0" width="100%" cellspacing="0" cellpadding="5"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD class="r t data top_stacked_value"&gt;73&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="r t data bottom_stacked_value"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="l t rowheader" scope="row" width="130px" height="34px"&gt;Total&lt;/TH&gt;
&lt;TD width="64px" height="34px" class="r t stacked_cell data"&gt;
&lt;TABLE border="0" width="100%" cellspacing="0" cellpadding="5"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD class="r t data top_stacked_value"&gt;200&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;/TD&gt;
&lt;TD width="52px" height="34px" class="r t stacked_cell data"&gt;
&lt;TABLE border="0" width="100%" cellspacing="0" cellpadding="5"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD class="r t data top_stacked_value"&gt;200&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;/DIV&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="lia-align-left"&gt;Is it possible to output the "Complete" frequency (127) and percent (63.50) and into a data set? Thank you&lt;/P&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;</description>
      <pubDate>Tue, 04 Aug 2020 14:46:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/output-proc-freq-percent/m-p/674374#M203070</guid>
      <dc:creator>GS2</dc:creator>
      <dc:date>2020-08-04T14:46:08Z</dc:date>
    </item>
    <item>
      <title>Re: output proc freq percent</title>
      <link>https://communities.sas.com/t5/SAS-Programming/output-proc-freq-percent/m-p/674378#M203073</link>
      <description>Look at the OUT option on the TABLE statement.&lt;BR /&gt;&lt;BR /&gt;proc freq data=sashelp.class;&lt;BR /&gt;table age*sex / out=want outpct;&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;It's also the first example in the documentation here:&lt;BR /&gt;&lt;A href="https://documentation.sas.com/?docsetId=procstat&amp;amp;docsetTarget=procstat_freq_examples01.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en" target="_blank"&gt;https://documentation.sas.com/?docsetId=procstat&amp;amp;docsetTarget=procstat_freq_examples01.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;And specific documentation on the OUT statement is here:&lt;BR /&gt;&lt;A href="https://documentation.sas.com/?docsetId=procstat&amp;amp;docsetVersion=9.4&amp;amp;docsetTarget=procstat_freq_syntax08.htm&amp;amp;locale=en" target="_blank"&gt;https://documentation.sas.com/?docsetId=procstat&amp;amp;docsetVersion=9.4&amp;amp;docsetTarget=procstat_freq_syntax08.htm&amp;amp;locale=en&lt;/A&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 04 Aug 2020 14:54:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/output-proc-freq-percent/m-p/674378#M203073</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2020-08-04T14:54:07Z</dc:date>
    </item>
    <item>
      <title>Re: output proc freq percent</title>
      <link>https://communities.sas.com/t5/SAS-Programming/output-proc-freq-percent/m-p/674379#M203074</link>
      <description>&lt;P&gt;It usually helps to show the code you are using so we can post code suggestions.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Proc freq will create output data sets several ways. One is to add an OUT=datasetname option to the tables statement. would require an OUTPCT option to get the percents. The OUT= option only will have result for a single table request. If you creating multiple tables then you either split the Tables statements or use ODS OUTPUT to capture results. You can use ODS OUTPUT CROSSTABFREQS=datasetname; as a statement in the Proc freq code to capture two-way tables.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This would have all the counts and percents, more less, and if you only want a specific value then you use the typical options to subset a data set.&lt;/P&gt;</description>
      <pubDate>Tue, 04 Aug 2020 14:55:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/output-proc-freq-percent/m-p/674379#M203074</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2020-08-04T14:55:55Z</dc:date>
    </item>
  </channel>
</rss>

