<?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: ods output OneWayFreqs(match_all) in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/ods-output-OneWayFreqs-match-all/m-p/972868#M377584</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/184742"&gt;@xxformat_com&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;A common variable VARVALUE containing NAME and AGE values must be a character variable. This is what PROC TRANSPOSE creates when transposing from wide to long. Then you can apply PROC FREQ to the "long" dataset.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Example:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data tmp / view=tmp;
seqno=_n_;
set sashelp.class;
run;

proc transpose data=tmp name=varname out=long(drop=seqno rename=(col1=varvalue));
by seqno;
var name--weight;
run;

proc sort data=long;
by varname;
run;

proc freq data=long noprint;
by varname;
tables varvalue / out=want;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 19 Aug 2025 10:43:41 GMT</pubDate>
    <dc:creator>FreelanceReinh</dc:creator>
    <dc:date>2025-08-19T10:43:41Z</dc:date>
    <item>
      <title>ods output OneWayFreqs(match_all)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ods-output-OneWayFreqs-match-all/m-p/972865#M377583</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The table outputted by proc freq do not have the same structure i.e.&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;We have the variable NAME in the first table, SEX inthe second table, AGE in he third table...&lt;/LI&gt;
&lt;LI&gt;We do not have two common variables in each table such as VARNAME and VARVALUE.&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;What would you suggest to have exactly the same variables in all the output datasets before appending them?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods output OneWayFreqs(match_all)=demo;

proc freq data=sashelp.class nlevels;
    table _all_;
run;

data freq_all;
    set demo:;
run;

proc print data=freq_all;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Tue, 19 Aug 2025 09:53:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ods-output-OneWayFreqs-match-all/m-p/972865#M377583</guid>
      <dc:creator>xxformat_com</dc:creator>
      <dc:date>2025-08-19T09:53:28Z</dc:date>
    </item>
    <item>
      <title>Re: ods output OneWayFreqs(match_all)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ods-output-OneWayFreqs-match-all/m-p/972868#M377584</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/184742"&gt;@xxformat_com&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;A common variable VARVALUE containing NAME and AGE values must be a character variable. This is what PROC TRANSPOSE creates when transposing from wide to long. Then you can apply PROC FREQ to the "long" dataset.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Example:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data tmp / view=tmp;
seqno=_n_;
set sashelp.class;
run;

proc transpose data=tmp name=varname out=long(drop=seqno rename=(col1=varvalue));
by seqno;
var name--weight;
run;

proc sort data=long;
by varname;
run;

proc freq data=long noprint;
by varname;
tables varvalue / out=want;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 19 Aug 2025 10:43:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ods-output-OneWayFreqs-match-all/m-p/972868#M377584</guid>
      <dc:creator>FreelanceReinh</dc:creator>
      <dc:date>2025-08-19T10:43:41Z</dc:date>
    </item>
    <item>
      <title>Re: ods output OneWayFreqs(match_all)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ods-output-OneWayFreqs-match-all/m-p/972871#M377586</link>
      <description>&lt;P&gt;PROC FREQ does not require that you use MATCH_ALL any more. I would suggest the following SAS Sample which creates one output data set and then reshapes it into a more readable format.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://support.sas.com/kb/37/780.html" target="_self"&gt;https://support.sas.com/kb/37/780.html&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Aug 2025 11:10:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ods-output-OneWayFreqs-match-all/m-p/972871#M377586</guid>
      <dc:creator>Kathryn_SAS</dc:creator>
      <dc:date>2025-08-19T11:10:11Z</dc:date>
    </item>
    <item>
      <title>Re: ods output OneWayFreqs(match_all)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ods-output-OneWayFreqs-match-all/m-p/972880#M377588</link>
      <description>&lt;P&gt;One of the advantages of&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13770"&gt;@Kathryn_SAS&lt;/a&gt;'s solution is that (by virtue of the VVALUEX function) it would honor formats that are permanently associated with variables in the input dataset. My PROC TRANSPOSE approach would do so only for numeric variables (and it creates an additional dataset, albeit with optimized lengths of variables VARNAME and VARVALUE).&lt;/P&gt;</description>
      <pubDate>Tue, 19 Aug 2025 13:41:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ods-output-OneWayFreqs-match-all/m-p/972880#M377588</guid>
      <dc:creator>FreelanceReinh</dc:creator>
      <dc:date>2025-08-19T13:41:55Z</dc:date>
    </item>
  </channel>
</rss>

