<?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: Running Proc Freq; in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Running-Proc-Freq/m-p/45339#M11942</link>
    <description>Thanks a a lot.. i really appreciate it. I am busy testing, and i will give u feedback.&lt;BR /&gt;
So far it works perfectly, i just need to supress a few outputs.</description>
    <pubDate>Fri, 22 Jan 2010 13:42:59 GMT</pubDate>
    <dc:creator>deleted_user</dc:creator>
    <dc:date>2010-01-22T13:42:59Z</dc:date>
    <item>
      <title>Running Proc Freq;</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Running-Proc-Freq/m-p/45337#M11940</link>
      <description>Hi,&lt;BR /&gt;
&lt;BR /&gt;
I would like to run a proc freq on data Set &lt;U&gt;&lt;I&gt;&lt;B&gt;A&lt;/B&gt;&lt;/I&gt;&lt;/U&gt; by passing it a list of variables from Data Set &lt;U&gt;&lt;I&gt;&lt;B&gt;B&lt;/B&gt;&lt;/I&gt;&lt;/U&gt;. The variables are in table &lt;U&gt;&lt;I&gt;&lt;B&gt;A&lt;/B&gt;&lt;/I&gt;&lt;/U&gt;, however i need to output the results of the proc freq to a data set labelled the variable name.&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
I have written a macro, but i don't know how to call the variable names from the data set &lt;U&gt;&lt;I&gt;&lt;B&gt;B&lt;/B&gt;&lt;/I&gt;&lt;/U&gt;.&lt;BR /&gt;
&lt;BR /&gt;
Any assistance will be appreciated.</description>
      <pubDate>Fri, 22 Jan 2010 09:53:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Running-Proc-Freq/m-p/45337#M11940</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2010-01-22T09:53:31Z</dc:date>
    </item>
    <item>
      <title>Re: Running Proc Freq;</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Running-Proc-Freq/m-p/45338#M11941</link>
      <description>In order to use the variables listed in B as code you can use PROC SQL to create macro variables.  These macro variables become part of the PROC FREQ call.  &lt;BR /&gt;
&lt;BR /&gt;
Here is an example that puts the PROC FREQ output into dataset named using the analysis variable names.&lt;BR /&gt;
&lt;BR /&gt;
[pre]&lt;BR /&gt;
%let vars = _char_;&lt;BR /&gt;
 &lt;BR /&gt;
** data A the data to summarize;&lt;BR /&gt;
data A;&lt;BR /&gt;
   set sashelp.shoes;&lt;BR /&gt;
   run;&lt;BR /&gt;
 &lt;BR /&gt;
** data B a list of variable names;&lt;BR /&gt;
proc transpose data=A(obs=0) out=B;&lt;BR /&gt;
   var _char_;&lt;BR /&gt;
   run;&lt;BR /&gt;
&lt;BR /&gt;
proc sql noprint;&lt;BR /&gt;
   select _name_ , cats('Freq.Table',monotonic(),'.OneWayFreqs=',_name_)&lt;BR /&gt;
      into :vars separated by ' ', :odsout separated by ' '&lt;BR /&gt;
   from b;&lt;BR /&gt;
   quit;&lt;BR /&gt;
   run;&lt;BR /&gt;
%put NOTE: VARS=&amp;amp;vars;&lt;BR /&gt;
%put NOTE- ODSOUT=&amp;amp;odsout;&lt;BR /&gt;
&lt;BR /&gt;
ods listing close;&lt;BR /&gt;
proc freq data=a;&lt;BR /&gt;
   tables &amp;amp;vars;&lt;BR /&gt;
   ods output &amp;amp;odsout;&lt;BR /&gt;
   run;&lt;BR /&gt;
ods listing;&lt;BR /&gt;
[/pre]</description>
      <pubDate>Fri, 22 Jan 2010 12:45:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Running-Proc-Freq/m-p/45338#M11941</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2010-01-22T12:45:38Z</dc:date>
    </item>
    <item>
      <title>Re: Running Proc Freq;</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Running-Proc-Freq/m-p/45339#M11942</link>
      <description>Thanks a a lot.. i really appreciate it. I am busy testing, and i will give u feedback.&lt;BR /&gt;
So far it works perfectly, i just need to supress a few outputs.</description>
      <pubDate>Fri, 22 Jan 2010 13:42:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Running-Proc-Freq/m-p/45339#M11942</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2010-01-22T13:42:59Z</dc:date>
    </item>
  </channel>
</rss>

