<?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: Out Parameter in PROC FREQ in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Out-Parameter-in-PROC-FREQ/m-p/109667#M22763</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;From the online help:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;If more than one table request appears in the TABLES statement, the contents of the OUT= data set correspond to the last table request in the TABLES statement.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So do you need counts only or percents as well?&lt;/P&gt;&lt;P&gt;Options:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Use Proc freq with multiple tables statements creating multiple output data sets and then combine the output sets.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Use another procedure.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 17 Jul 2012 22:11:16 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2012-07-17T22:11:16Z</dc:date>
    <item>
      <title>Out Parameter in PROC FREQ</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Out-Parameter-in-PROC-FREQ/m-p/109666#M22762</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;Dear All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried to execute below program using PROC FREQ. While executing this program, added OUT Parameter in FREQ Procedure. My expectation is in the OUT SAS Data set (full) will create all the fields data. But unfortunately, am getting only ID Data only. Please suggest me or help me , how can I get all fields data into SAS Data set Full ( which is creating as part of OUT Parameter in PROC FREQ).&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;SPAN lang="EN"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;SPAN lang="EN"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;options obs=max compress=yes;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style=": ; font-size: 8pt;"&gt;&lt;SPAN lang="EN"&gt;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;libname a "/root/samba/d071212";&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style=": ; font-size: 8pt;"&gt;&lt;SPAN lang="EN"&gt;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style=": ; font-size: 8pt;"&gt;&lt;SPAN lang="EN"&gt; &lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;PROC FREQ DATA = a.test1;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style=": ; font-size: 8pt;"&gt;&lt;SPAN lang="EN"&gt;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;tables Accountnumber &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style=": ; font-size: 8pt;"&gt;&lt;SPAN lang="EN"&gt;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;SOURCE&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style=": ; font-size: 8pt;"&gt;&lt;SPAN lang="EN"&gt;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;DATE_STAMP &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style=": ; font-size: 8pt;"&gt;&lt;SPAN lang="EN"&gt;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;TIME_STAMP &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style=": ; font-size: 8pt;"&gt;&lt;SPAN lang="EN"&gt;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;SEQ_NO &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style=": ; font-size: 8pt;"&gt;&lt;SPAN lang="EN"&gt;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;NAME_PREFIX&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style=": ; font-size: 8pt;"&gt;&lt;SPAN lang="EN"&gt;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style=": ; font-size: 8pt;"&gt;&lt;SPAN lang="EN"&gt;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;ID /list missing&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style=": ; font-size: 8pt;"&gt;&lt;SPAN lang="EN"&gt;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;out=a.full;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style=": ; font-size: 8pt;"&gt;&lt;SPAN lang="EN"&gt;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Regards,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;S Ravuri.&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Jul 2012 17:45:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Out-Parameter-in-PROC-FREQ/m-p/109666#M22762</guid>
      <dc:creator>sambasiva_ravuri_tcs_com</dc:creator>
      <dc:date>2012-07-17T17:45:29Z</dc:date>
    </item>
    <item>
      <title>Re: Out Parameter in PROC FREQ</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Out-Parameter-in-PROC-FREQ/m-p/109667#M22763</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;From the online help:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;If more than one table request appears in the TABLES statement, the contents of the OUT= data set correspond to the last table request in the TABLES statement.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So do you need counts only or percents as well?&lt;/P&gt;&lt;P&gt;Options:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Use Proc freq with multiple tables statements creating multiple output data sets and then combine the output sets.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Use another procedure.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Jul 2012 22:11:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Out-Parameter-in-PROC-FREQ/m-p/109667#M22763</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2012-07-17T22:11:16Z</dc:date>
    </item>
    <item>
      <title>Re: Out Parameter in PROC FREQ</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Out-Parameter-in-PROC-FREQ/m-p/109668#M22764</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi ... OUT= will only contain one table, that for the last variable listed in the TABLES statement&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you can try ODS to get all the results in one data set, for example ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;ods listing close;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;ods output onewayfreqs=tables (drop=f_:);&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;proc freq data=sashelp.class;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;tables _all_ / missing;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;run;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;ods output close;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;ods listing;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif;"&gt;the resulting data set is a little "messy" and you'll have to write a bit of SAS code to make it usable&amp;nbsp; (the DROP data set option drops the formatted values of variables from the data set so if you also want them, get rid of the DROP)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif;"&gt;I wrote a paper about using the above SAS code to create a missing data report and it has some ideas you might be able to use in looking at the data set you get from PROC FREQ ...&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif;"&gt;&lt;A href="http://www.nesug.org/Proceedings/nesug11/ds/ds12.pdf" title="http://www.nesug.org/Proceedings/nesug11/ds/ds12.pdf"&gt;http://www.nesug.org/Proceedings/nesug11/ds/ds12.pdf&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Jul 2012 22:14:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Out-Parameter-in-PROC-FREQ/m-p/109668#M22764</guid>
      <dc:creator>MikeZdeb</dc:creator>
      <dc:date>2012-07-17T22:14:26Z</dc:date>
    </item>
  </channel>
</rss>

