<?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 Saving the results from Proc Freq in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Saving-the-results-from-Proc-Freq/m-p/707007#M79974</link>
    <description>&lt;P&gt;This seems like something I should easily be able to find the answer to, but, alas, I'm having trouble. I'm reading in a data set and then running a proc contents and a proc freq command. I would like to save the tables that are output to the Results Viewer to a folder on my local machine. Can someone explain how to do this?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;proc import datafile="filepath\filename.dta" out=mydata dbms = dta replace;
run;

proc contents; 
run;

proc freq data=mydata; table var1; 
run;&lt;/PRE&gt;</description>
    <pubDate>Fri, 18 Dec 2020 16:59:55 GMT</pubDate>
    <dc:creator>raivester</dc:creator>
    <dc:date>2020-12-18T16:59:55Z</dc:date>
    <item>
      <title>Saving the results from Proc Freq</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Saving-the-results-from-Proc-Freq/m-p/707007#M79974</link>
      <description>&lt;P&gt;This seems like something I should easily be able to find the answer to, but, alas, I'm having trouble. I'm reading in a data set and then running a proc contents and a proc freq command. I would like to save the tables that are output to the Results Viewer to a folder on my local machine. Can someone explain how to do this?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;proc import datafile="filepath\filename.dta" out=mydata dbms = dta replace;
run;

proc contents; 
run;

proc freq data=mydata; table var1; 
run;&lt;/PRE&gt;</description>
      <pubDate>Fri, 18 Dec 2020 16:59:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Saving-the-results-from-Proc-Freq/m-p/707007#M79974</guid>
      <dc:creator>raivester</dc:creator>
      <dc:date>2020-12-18T16:59:55Z</dc:date>
    </item>
    <item>
      <title>Re: Saving the results from Proc Freq</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Saving-the-results-from-Proc-Freq/m-p/707010#M79975</link>
      <description>&lt;P&gt;1. Save to a data set and then export that data set. The table layout is not as shown in the Results pane.&lt;/P&gt;
&lt;P&gt;2. Pipe results directly to a PDF, Word or Excel file. Results are more similar to the ones shown in the Results pane.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;/*1*/
proc freq data=sashelp.heart;
table chol_status / out= want1;
run;

proc print data=want1;
run;

*export to data set;
proc export data=want1 outfile='/folders/myfolders/procfreqout.xlsx'
dbms=xlsx replace; run;

/*2*/

ods excel file = '/folders/myfolders/procfreqoutput2.xlsx' style = meadow;

proc freq data=sashelp.heart;
table chol_status / out= want1;
run;

ods excel close;

ods pdf file = '/folders/myfolders/procfreqoutput2.pdf' style = meadow;

proc freq data=sashelp.heart;
table chol_status / out= want1;
run;

ods pdf close;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/326526"&gt;@raivester&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;This seems like something I should easily be able to find the answer to, but, alas, I'm having trouble. I'm reading in a data set and then running a proc contents and a proc freq command. I would like to save the tables that are output to the Results Viewer to a folder on my local machine. Can someone explain how to do this?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;proc import datafile="filepath\filename.dta" out=mydata dbms = dta replace;
run;

proc contents; 
run;

proc freq data=mydata; table var1; 
run;&lt;/PRE&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 18 Dec 2020 17:08:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Saving-the-results-from-Proc-Freq/m-p/707010#M79975</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2020-12-18T17:08:25Z</dc:date>
    </item>
    <item>
      <title>Re: Saving the results from Proc Freq</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Saving-the-results-from-Proc-Freq/m-p/707019#M79976</link>
      <description>&lt;P&gt;It is not clear what format you want for the tables. If you want to save the results as a SAS data set, you can &lt;A href="https://blogs.sas.com/content/iml/2017/01/09/ods-output-any-statistic.html" target="_self"&gt;use the ODS OUTPUT statement&amp;nbsp;&lt;/A&gt;and save the data set to a libref that points to a directory on your PC.&lt;/P&gt;</description>
      <pubDate>Fri, 18 Dec 2020 17:31:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Saving-the-results-from-Proc-Freq/m-p/707019#M79976</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2020-12-18T17:31:04Z</dc:date>
    </item>
  </channel>
</rss>

