<?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: Save values from a Proc Freq in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Save-values-from-a-Proc-Freq/m-p/751277#M236472</link>
    <description>&lt;P&gt;Better: provide example data, rules and what the report should look like.&lt;/P&gt;
&lt;P&gt;When I hear "save into a macro variable" for a report I see lots of extra work that often can be done by either Proc Report or Tabulate.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 30 Jun 2021 14:47:28 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2021-06-30T14:47:28Z</dc:date>
    <item>
      <title>Save values from a Proc Freq</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Save-values-from-a-Proc-Freq/m-p/751228#M236454</link>
      <description>&lt;P&gt;I would need to create a custom report that I at the end will export into an excel file.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;One thing I would like to do, is to use the numbers from a Proc freq report to save&amp;nbsp; into a Macro Variable or into a data step:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc freq&amp;nbsp;data=MyData;&lt;BR /&gt;&amp;nbsp;table&amp;nbsp;MyVar;&lt;BR /&gt;run;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;* The&amp;nbsp;result&amp;nbsp;from&amp;nbsp;this,&amp;nbsp;I&amp;nbsp;would&amp;nbsp;like&amp;nbsp;to&amp;nbsp;save&amp;nbsp;into&amp;nbsp;different&amp;nbsp;macro&amp;nbsp;variables&amp;nbsp;or&amp;nbsp;a&amp;nbsp;data&amp;nbsp;step;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Is this possible to do? Theoretically, I could calculate everything by hand or for instance write it down manually, but obviously I would like to do this automatically.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 30 Jun 2021 13:29:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Save-values-from-a-Proc-Freq/m-p/751228#M236454</guid>
      <dc:creator>SasStatistics</dc:creator>
      <dc:date>2021-06-30T13:29:20Z</dc:date>
    </item>
    <item>
      <title>Re: Save values from a Proc Freq</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Save-values-from-a-Proc-Freq/m-p/751229#M236455</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc freq data=MyData; 
    table MyVar/out=counts; /* Hint: check the documentation to see if there is an option that does what you want */
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;or&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc freq data=MyData;
    ods output onewayfreqs=counts;
    table MyVar;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 30 Jun 2021 13:35:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Save-values-from-a-Proc-Freq/m-p/751229#M236455</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2021-06-30T13:35:11Z</dc:date>
    </item>
    <item>
      <title>Re: Save values from a Proc Freq</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Save-values-from-a-Proc-Freq/m-p/751265#M236465</link>
      <description>&lt;P&gt;Before you start building from scratch I recommend checking out JeffMyers macros in the SAS Community Library.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://communities.sas.com/t5/SAS-Communities-Library/Demographic-Table-and-Subgroup-Summary-Macro-TABLEN/ta-p/634030" target="_blank"&gt;https://communities.sas.com/t5/SAS-Communities-Library/Demographic-Table-and-Subgroup-Summary-Macro-TABLEN/ta-p/634030&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://communities.sas.com/t5/SAS-Communities-Library/Library-Datasets-Summary-Macro-DATA-SPECS/ta-p/544757" target="_blank"&gt;https://communities.sas.com/t5/SAS-Communities-Library/Library-Datasets-Summary-Macro-DATA-SPECS/ta-p/544757&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 30 Jun 2021 14:24:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Save-values-from-a-Proc-Freq/m-p/751265#M236465</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2021-06-30T14:24:24Z</dc:date>
    </item>
    <item>
      <title>Re: Save values from a Proc Freq</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Save-values-from-a-Proc-Freq/m-p/751277#M236472</link>
      <description>&lt;P&gt;Better: provide example data, rules and what the report should look like.&lt;/P&gt;
&lt;P&gt;When I hear "save into a macro variable" for a report I see lots of extra work that often can be done by either Proc Report or Tabulate.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 30 Jun 2021 14:47:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Save-values-from-a-Proc-Freq/m-p/751277#M236472</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2021-06-30T14:47:28Z</dc:date>
    </item>
  </channel>
</rss>

