<?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 proc append dynamically in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/proc-append-dynamically/m-p/139518#M37321</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello, everyone&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have +-100&amp;nbsp; tables that every month I need to have them updated. I'm using this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%macro append (table);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; proc append base=&amp;amp;table. data=&amp;amp;table. (obs=0); run;&lt;/P&gt;&lt;P&gt;%mend;&lt;/P&gt;&lt;P&gt;%append(have1);&lt;/P&gt;&lt;P&gt;%append(have2);&lt;/P&gt;&lt;P&gt;%append(have3);&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;..&lt;/P&gt;&lt;P&gt;%append(have99);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there a better way to do this? Some code that list all tables from the dictionary tables and make the proc append using a Loop?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for any help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 28 Jul 2014 20:37:30 GMT</pubDate>
    <dc:creator>Augusto</dc:creator>
    <dc:date>2014-07-28T20:37:30Z</dc:date>
    <item>
      <title>proc append dynamically</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/proc-append-dynamically/m-p/139518#M37321</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello, everyone&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have +-100&amp;nbsp; tables that every month I need to have them updated. I'm using this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%macro append (table);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; proc append base=&amp;amp;table. data=&amp;amp;table. (obs=0); run;&lt;/P&gt;&lt;P&gt;%mend;&lt;/P&gt;&lt;P&gt;%append(have1);&lt;/P&gt;&lt;P&gt;%append(have2);&lt;/P&gt;&lt;P&gt;%append(have3);&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;..&lt;/P&gt;&lt;P&gt;%append(have99);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there a better way to do this? Some code that list all tables from the dictionary tables and make the proc append using a Loop?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for any help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Jul 2014 20:37:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/proc-append-dynamically/m-p/139518#M37321</guid>
      <dc:creator>Augusto</dc:creator>
      <dc:date>2014-07-28T20:37:30Z</dc:date>
    </item>
    <item>
      <title>Re: proc append dynamically</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/proc-append-dynamically/m-p/139519#M37322</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well, I would assign them a library reference of their own, so you can identify those files and then do:&lt;/P&gt;&lt;P&gt;data _null_;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; set sashelp.vtables (where=(libname="your libname");&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; by libname;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if first.libname then call execute('data '||strip(memname)||'; set '||strip(memname));&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; else call execute(" "||strip(memname));&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if last.libname then call execute('; run;');&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This will generate a datastep with a set statement and then a list of all the datasets in the given libname.&amp;nbsp; Note if the datasets are not the same then the final one will have more variables (proc append will stop working unless you specify not to).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Jul 2014 09:10:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/proc-append-dynamically/m-p/139519#M37322</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2014-07-29T09:10:27Z</dc:date>
    </item>
    <item>
      <title>Re: proc append dynamically</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/proc-append-dynamically/m-p/139520#M37323</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi RW9 thanks, but it's not what I need. If you look at my code I'm updating the same table doing proc append with 'Zero" observations. It seems "strange" but is exactle what I need (once in a while we just have to simple update some tables here).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Jul 2014 13:07:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/proc-append-dynamically/m-p/139520#M37323</guid>
      <dc:creator>Augusto</dc:creator>
      <dc:date>2014-07-29T13:07:56Z</dc:date>
    </item>
    <item>
      <title>Re: proc append dynamically</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/proc-append-dynamically/m-p/139521#M37324</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry, what do you mean by update tables?&amp;nbsp; Do you mean new variables to be added or variable type to be changed?&amp;nbsp; I can't see that your code is actually doing anything, i.e. if I have a dataset with 10 observations and 10 variables and then I append the same 10 variable dataset without any rows, I still have a dataset with 10 rows and 10 variables, nothing has changed?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Jul 2014 13:22:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/proc-append-dynamically/m-p/139521#M37324</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2014-07-29T13:22:52Z</dc:date>
    </item>
    <item>
      <title>Re: proc append dynamically</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/proc-append-dynamically/m-p/139522#M37325</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You could do:&lt;/P&gt;&lt;P&gt;%macro append (table);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; proc append base=&amp;amp;table. data=&amp;amp;table. (obs=0); run;&lt;/P&gt;&lt;P&gt;%mend;&lt;/P&gt;&lt;P&gt;data _null_;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; set sashelp.vtable (where=(libname="XYZ"));&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; call execute('%append('||strip(memname)||');');&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Jul 2014 13:27:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/proc-append-dynamically/m-p/139522#M37325</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2014-07-29T13:27:21Z</dc:date>
    </item>
    <item>
      <title>Re: proc append dynamically</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/proc-append-dynamically/m-p/139523#M37326</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;RW9 I just wanted to update the modate...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Jul 2014 14:56:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/proc-append-dynamically/m-p/139523#M37326</guid>
      <dc:creator>Augusto</dc:creator>
      <dc:date>2014-07-29T14:56:21Z</dc:date>
    </item>
  </channel>
</rss>

