<?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: create a table about summary of 30 tables in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/create-a-table-about-summary-of-30-tables/m-p/527092#M5217</link>
    <description>&lt;P&gt;That's one reason to never split your data sets. You can create a view which stacks the data sets temporarily and then calculates your summary statistics. Or you can write a macro that calculates it for each data set and then appends it but that's a much more complicated task. I'd only recommend that if your data sets are too big to process as one data set.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _temp / view=_temp;
set table1-table30 indsname=mySource;
ds = mySource;
keep Good DS;
run;

proc means data=_temp noprint;
by ds NOTSORTED;
var Good;
output out=want mean=Mean_Good;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Mon, 14 Jan 2019 20:21:52 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2019-01-14T20:21:52Z</dc:date>
    <item>
      <title>create a table about summary of 30 tables</title>
      <link>https://communities.sas.com/t5/New-SAS-User/create-a-table-about-summary-of-30-tables/m-p/527079#M5212</link>
      <description>&lt;P&gt;Dear SAS community,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a question that needs your wisdom.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have 30 tables, say Table1,table2,...table 30. All of them have the same data structure and the&amp;nbsp;same list of variables (which&amp;nbsp;includes a variable name GOOD)&amp;nbsp;except that the&amp;nbsp;ith &amp;nbsp;table denotes the&amp;nbsp;month i.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now I need to create a new table X, which is composed of two columns/variables.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The first variable of table X is i, the index for table i; the second variable of table X&amp;nbsp;is the means of variable GOOD for table i.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does any one can point me to any idea/procedure/SAS macro that achieve this?&lt;/P&gt;&lt;P&gt;Rather than&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance!!!&lt;/P&gt;</description>
      <pubDate>Mon, 14 Jan 2019 20:13:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/create-a-table-about-summary-of-30-tables/m-p/527079#M5212</guid>
      <dc:creator>changxuosu</dc:creator>
      <dc:date>2019-01-14T20:13:13Z</dc:date>
    </item>
    <item>
      <title>Re: create a table about summary of 30 tables</title>
      <link>https://communities.sas.com/t5/New-SAS-User/create-a-table-about-summary-of-30-tables/m-p/527092#M5217</link>
      <description>&lt;P&gt;That's one reason to never split your data sets. You can create a view which stacks the data sets temporarily and then calculates your summary statistics. Or you can write a macro that calculates it for each data set and then appends it but that's a much more complicated task. I'd only recommend that if your data sets are too big to process as one data set.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _temp / view=_temp;
set table1-table30 indsname=mySource;
ds = mySource;
keep Good DS;
run;

proc means data=_temp noprint;
by ds NOTSORTED;
var Good;
output out=want mean=Mean_Good;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 14 Jan 2019 20:21:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/create-a-table-about-summary-of-30-tables/m-p/527092#M5217</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2019-01-14T20:21:52Z</dc:date>
    </item>
    <item>
      <title>Re: create a table about summary of 30 tables</title>
      <link>https://communities.sas.com/t5/New-SAS-User/create-a-table-about-summary-of-30-tables/m-p/527105#M5222</link>
      <description>thanks, works like a charm...</description>
      <pubDate>Mon, 14 Jan 2019 20:37:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/create-a-table-about-summary-of-30-tables/m-p/527105#M5222</guid>
      <dc:creator>changxuosu</dc:creator>
      <dc:date>2019-01-14T20:37:09Z</dc:date>
    </item>
  </channel>
</rss>

