<?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 consecutive table in SAS in SAS Studio</title>
    <link>https://communities.sas.com/t5/SAS-Studio/Create-consecutive-table-in-SAS/m-p/299186#M1155</link>
    <description>&lt;P&gt;You need to use macro language to generate code.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let id=100 ;
%let inds=a.a ;


proc sql ;
   create table x&amp;amp;id as 
     select * 
     from &amp;amp;inds
     where id = &amp;amp;id
   ;
quit;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Mon, 19 Sep 2016 00:15:02 GMT</pubDate>
    <dc:creator>Tom</dc:creator>
    <dc:date>2016-09-19T00:15:02Z</dc:date>
    <item>
      <title>Create consecutive table in SAS</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Create-consecutive-table-in-SAS/m-p/299184#M1153</link>
      <description>&lt;P&gt;Hi, I'm trying to create a counting variable in PROC SQL to give name to tables.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;PROC SQL;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;i&lt;/STRONG&gt;=1;&lt;/P&gt;&lt;P&gt;CREATE TABLE&lt;STRONG&gt; i&lt;/STRONG&gt; AS SELECT* FROM A.A WHERE XX=&lt;STRONG&gt;i&lt;/STRONG&gt;;&lt;/P&gt;&lt;P&gt;RUN;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I can not declarete the variable i to make it interactive.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 18 Sep 2016 23:00:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Create-consecutive-table-in-SAS/m-p/299184#M1153</guid>
      <dc:creator>mariange8282</dc:creator>
      <dc:date>2016-09-18T23:00:23Z</dc:date>
    </item>
    <item>
      <title>Re: Create consecutive table in SAS</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Create-consecutive-table-in-SAS/m-p/299185#M1154</link>
      <description>&lt;P&gt;The usual recommendation is don't do this...if you specify why, send can usually offer a more efficient alternative.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Otherwise You want a macro loop.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://www.ats.ucla.edu/stat/sas/seminars/sas_macros_introduction/" target="_blank"&gt;http://www.ats.ucla.edu/stat/sas/seminars/sas_macros_introduction/&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://communities.sas.com/t5/SAS-Communities-Library/SAS-9-4-Macro-Language-Reference-Has-a-New-Appendix/ta-p/291716" target="_blank"&gt;https://communities.sas.com/t5/SAS-Communities-Library/SAS-9-4-Macro-Language-Reference-Has-a-New-Appendix/ta-p/291716&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How to split a table by groups.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.sas.com/content/sasdummy/2015/01/26/how-to-split-one-data-set-into-many/" target="_blank"&gt;http://blogs.sas.com/content/sasdummy/2015/01/26/how-to-split-one-data-set-into-many/&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 18 Sep 2016 23:28:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Create-consecutive-table-in-SAS/m-p/299185#M1154</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-09-18T23:28:04Z</dc:date>
    </item>
    <item>
      <title>Re: Create consecutive table in SAS</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Create-consecutive-table-in-SAS/m-p/299186#M1155</link>
      <description>&lt;P&gt;You need to use macro language to generate code.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let id=100 ;
%let inds=a.a ;


proc sql ;
   create table x&amp;amp;id as 
     select * 
     from &amp;amp;inds
     where id = &amp;amp;id
   ;
quit;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 19 Sep 2016 00:15:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Create-consecutive-table-in-SAS/m-p/299186#M1155</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2016-09-19T00:15:02Z</dc:date>
    </item>
    <item>
      <title>Re: Create consecutive table in SAS</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Create-consecutive-table-in-SAS/m-p/299199#M1156</link>
      <description>&lt;P&gt;Thanks, it was just the sintaxsis.. but I just forget said I want a loop. I change my code for this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;%LET i=1;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;DATA A.A_&amp;amp;i;&lt;/P&gt;&lt;P&gt;SET A.A(WHERE=(XX=&amp;amp;i));&lt;/P&gt;&lt;P&gt;RUN;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But I need, i=i+1&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;%LET i=1;&lt;/P&gt;&lt;P&gt;DATA A.A_&amp;amp;i;&lt;BR /&gt;SET A.A(WHERE=(XX=&amp;amp;i));&lt;/P&gt;&lt;P&gt;i=i+1&lt;BR /&gt;RUN;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 19 Sep 2016 03:59:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Create-consecutive-table-in-SAS/m-p/299199#M1156</guid>
      <dc:creator>mariange8282</dc:creator>
      <dc:date>2016-09-19T03:59:40Z</dc:date>
    </item>
    <item>
      <title>Re: Create consecutive table in SAS</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Create-consecutive-table-in-SAS/m-p/299242#M1157</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%macro make_datasets(max_i);
%do i = 1 %to &amp;amp;max_i;
data a.a_&amp;amp;i;
set a.a (where=(XX=&amp;amp;i));
run;
%end;
%mend;
%make_datasets(100);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 19 Sep 2016 11:36:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Create-consecutive-table-in-SAS/m-p/299242#M1157</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2016-09-19T11:36:04Z</dc:date>
    </item>
  </channel>
</rss>

