<?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: Making an update in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Making-an-update/m-p/152294#M40078</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks everyone for participating, i just didn't want to take time writing logical code, I though it could be simple, but not.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'll be very grateful if someone just help me with this below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) List all tables from the "&lt;STRONG&gt;GPA&lt;/STRONG&gt;" LIBNAME with modate less than 6 (Six months ago) - Please, consider the time to compare is always the actual time because the process will be run daily, thus use datetime or today().&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Augusto&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 24 Jun 2014 13:09:12 GMT</pubDate>
    <dc:creator>Augusto</dc:creator>
    <dc:date>2014-06-24T13:09:12Z</dc:date>
    <item>
      <title>Making an update</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Making-an-update/m-p/152285#M40069</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; There is a process that deletes tables over 6 months of inactivity. To solve this issue I need to update all tables from a libname (GPA) that are not modified over 6 months ago. The update can be just an append with "0" zero observation or other better way, because I only need to have those table updated. Someone can write a code to me? Tks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Jun 2014 14:49:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Making-an-update/m-p/152285#M40069</guid>
      <dc:creator>Augusto</dc:creator>
      <dc:date>2014-06-23T14:49:20Z</dc:date>
    </item>
    <item>
      <title>Re: Making an update</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Making-an-update/m-p/152286#M40070</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Upon what the process to decide 6 month of inactivity? One simple solution could be in-situ copy its own, such as:&lt;/P&gt;&lt;P&gt;data have;&lt;/P&gt;&lt;P&gt; set have;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then you will find the "modate" value is updated in dictionary.tables. Appending 0 records using proc append such as;&lt;BR /&gt;proc append base=have data=have(obs=0);&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;doesn't seem to work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Haikuo &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Jun 2014 15:08:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Making-an-update/m-p/152286#M40070</guid>
      <dc:creator>Haikuo</dc:creator>
      <dc:date>2014-06-23T15:08:48Z</dc:date>
    </item>
    <item>
      <title>Re: Making an update</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Making-an-update/m-p/152287#M40071</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Haikuo. Thanks but I need to update and not recreate them, because them can be very large, because of this i thought to use the proc append "0" with zero observation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I thought something like this below.(I made comments where i had trouble); &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) list all tables from the GPA libname&lt;/P&gt;&lt;P&gt;proc sql noprint;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; select cats(libname,'.',memname) into: nm_tables separated by ',' from dictionary.tables&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; where libname eq 'GPA'&amp;nbsp; and modate&amp;nbsp; less then 6 months ago using intck (i had trouble to compare the modate with datetime using the intck);&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2) i need such a loop process to make a proc append with ZERO observation in each table to just update them. Consider that you can have as 1 as 1000 tables into this libname and also each one has your own layout.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Maybe could be solved using the Macro facility&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Jun 2014 03:05:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Making-an-update/m-p/152287#M40071</guid>
      <dc:creator>Augusto</dc:creator>
      <dc:date>2014-06-24T03:05:22Z</dc:date>
    </item>
    <item>
      <title>Re: Making an update</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Making-an-update/m-p/152288#M40072</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If I understand you correctly you want to remove all rows from tables that were last modified more than 6 months ago?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If so a simple and efficient way to remove all rows is this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data MyTable;&lt;/P&gt;&lt;P&gt;&amp;nbsp; set MyTable (obs = 0);&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As you suggest if you are doing many tables a macro is a good option. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Jun 2014 04:07:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Making-an-update/m-p/152288#M40072</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2014-06-24T04:07:14Z</dc:date>
    </item>
    <item>
      <title>Re: Making an update</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Making-an-update/m-p/152289#M40073</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So you just need to set the modification date of the files so that the system does not automatically archive/delete them?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Why make it so complicated, every OS has a utility to do that from the command line. On UNIX it is called touch, in Windows you use copy, as described here: &lt;A href="http://superuser.com/questions/10426/windows-equivalent-of-the-linux-command-touch" title="http://superuser.com/questions/10426/windows-equivalent-of-the-linux-command-touch"&gt;http://superuser.com/questions/10426/windows-equivalent-of-the-linux-command-touch&lt;/A&gt;&lt;/P&gt;&lt;P&gt;So you only need to find the files that need touching, build the physical filenames and then do a call system with the correct command.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One nice sideeffect: the internally stored modification date that SAS shows in "Properties" is not affected.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Jun 2014 06:47:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Making-an-update/m-p/152289#M40073</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2014-06-24T06:47:41Z</dc:date>
    </item>
    <item>
      <title>Re: Making an update</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Making-an-update/m-p/152290#M40074</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No &lt;A _jive_internal="true" class="jiveTT-hover-user jive-username-link" data-avatarid="-1" data-externalid="" data-presence="null" data-userid="312252" data-username="SASKiwi" href="https://communities.sas.com/people/SASKiwi" id="jive-31225218962905513682186"&gt;SASKiwi&lt;/A&gt;,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To be more clearly. In my job we have a process that is executed by TI System that deletes (drop) old tables (tables that are not used, inactive, not modified) for more than 6 months. This process is executed everyday.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a process that use some historical tables from a specific libname (GPA).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I just need to update those tables, i don't want to recreate them, delete rows neither make inserts.. I thought to make an append (with "0" observation) because is faster and will changes nothing. Thus, I can have those tables updated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I just need to know how to do that.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Jun 2014 11:28:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Making-an-update/m-p/152290#M40074</guid>
      <dc:creator>Augusto</dc:creator>
      <dc:date>2014-06-24T11:28:38Z</dc:date>
    </item>
    <item>
      <title>Re: Making an update</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Making-an-update/m-p/152291#M40075</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;KurtBremser the command Copy will make a copy of the file, so I do not want make a copy because I will not have suficiente disk space&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Jun 2014 11:31:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Making-an-update/m-p/152291#M40075</guid>
      <dc:creator>Augusto</dc:creator>
      <dc:date>2014-06-24T11:31:15Z</dc:date>
    </item>
    <item>
      <title>Re: Making an update</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Making-an-update/m-p/152292#M40076</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So the question is, why are you trying to break the process?&amp;nbsp; Surely the TI (whatever that is) process is there for a reason, if that reason is no longer valid then remove or change it.&amp;nbsp; If you want to run outputs based on data, then that would be snapshotting, i.e. taking a copy of the data at that specific timepoint.&amp;nbsp; I don't know your industry, however at least in my role, if we run outputs then we need to be able to re-create those at any time in the future hence we take snapshots of the data at given timepoints.&amp;nbsp; It sounds like you have more of a process issue than a technical one.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Jun 2014 11:56:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Making-an-update/m-p/152292#M40076</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2014-06-24T11:56:39Z</dc:date>
    </item>
    <item>
      <title>Re: Making an update</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Making-an-update/m-p/152293#M40077</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You're right, that will also take unnecessary time.&lt;/P&gt;&lt;P&gt;Solution #1: Get rid of the microcrap and start working with a real operating system that has all the useful stuff built in. Not to be taken that seriously, but give it a thought.&lt;/P&gt;&lt;P&gt;Solution #2: Install a Windows version of the touch utility, usually from GNU&lt;/P&gt;&lt;P&gt;Solution #3:&lt;/P&gt;&lt;P&gt;data have1;&lt;/P&gt;&lt;P&gt;set have (obs=0);&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;proc append data=have1 base=have;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;proc delete data=have1;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;This has successfully changed the modification date (internally and externally though), and append does not rewrite the whole file.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Jun 2014 12:03:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Making-an-update/m-p/152293#M40077</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2014-06-24T12:03:46Z</dc:date>
    </item>
    <item>
      <title>Re: Making an update</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Making-an-update/m-p/152294#M40078</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks everyone for participating, i just didn't want to take time writing logical code, I though it could be simple, but not.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'll be very grateful if someone just help me with this below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) List all tables from the "&lt;STRONG&gt;GPA&lt;/STRONG&gt;" LIBNAME with modate less than 6 (Six months ago) - Please, consider the time to compare is always the actual time because the process will be run daily, thus use datetime or today().&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Augusto&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Jun 2014 13:09:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Making-an-update/m-p/152294#M40078</guid>
      <dc:creator>Augusto</dc:creator>
      <dc:date>2014-06-24T13:09:12Z</dc:date>
    </item>
    <item>
      <title>Re: Making an update</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Making-an-update/m-p/152295#M40079</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You find that in dictionary.tables and use the intnx function.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc sql;&lt;/P&gt;&lt;P&gt;create table gpa as&lt;/P&gt;&lt;P&gt;select memname from dictionary.tables&lt;/P&gt;&lt;P&gt;where libname = 'GPA' and modate &amp;gt; intnx('month',date(),6); * or did you mean earlier than six months, then it is &amp;lt;;&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Jun 2014 06:41:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Making-an-update/m-p/152295#M40079</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2014-06-25T06:41:22Z</dc:date>
    </item>
    <item>
      <title>Re: Making an update</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Making-an-update/m-p/152296#M40080</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;Now, i just need to make an &lt;SPAN class="hps"&gt;iteratively &lt;/SPAN&gt;proc append &lt;SPAN class="hps"&gt; to insert "ZERO" observation into each one table listed.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="hps"&gt;&lt;/SPAN&gt;%macro havetb;&lt;BR /&gt;%do i = 1 %to 5;&lt;BR /&gt;data have&amp;amp;i.;&lt;BR /&gt;x = 1;&lt;BR /&gt;run;&lt;BR /&gt;%end;&lt;BR /&gt;%mend;&lt;BR /&gt;%havetb;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc sql;&lt;/P&gt;&lt;P&gt;create table total_have&lt;/P&gt;&lt;P&gt;as select&lt;/P&gt;&lt;P&gt;cats(libname,'.',memname) as nm_tables, modate&lt;/P&gt;&lt;P&gt;from dictionary.tables&lt;/P&gt;&lt;P&gt;where libname eq 'WORK' and modate gt intnx('month',date(),6) and memtype eq 'DATA';&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/* I just need to fix the code below (its getting in looping....) - Its was just my logic, if someone has another way that works just post.*/&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/*creates the macro*/&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%macro append(want);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; proc append base = &amp;amp;want. data = &amp;amp;want. (obs=0); run;&lt;/P&gt;&lt;P&gt;%mend append;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/*making the append for each table*/&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data _null_;&lt;/P&gt;&lt;P&gt;set total_have end = eof;&lt;/P&gt;&lt;P&gt;do until(eof);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; %append(nm_tables);&lt;/P&gt;&lt;P&gt;end;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Unfortunatelly its not working...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Jul 2014 19:15:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Making-an-update/m-p/152296#M40080</guid>
      <dc:creator>Augusto</dc:creator>
      <dc:date>2014-07-01T19:15:05Z</dc:date>
    </item>
    <item>
      <title>Re: Making an update</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Making-an-update/m-p/152297#M40081</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It looks like you could apply straightforward techniques to this problem.&amp;nbsp; For a single data set:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data zero;&lt;/P&gt;&lt;P&gt;stop;&lt;/P&gt;&lt;P&gt;set have;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc append base=have data=zero;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If that works for a single table, it should be easy enough to use macro language to apply the same techniques to a list of table names:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%macro append_zero (nm_tables);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; %local i next_table;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; %do i = 1 %to %sysfunc(countw(&amp;amp;nm_tables));&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; %let next_table = %scan(&amp;amp;nm_tables, &amp;amp;i, %str( ));&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; data zero;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; stop;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; set &amp;amp;next_table;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; run;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; proc append data=zero base=&amp;amp;next_table;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; %end;&lt;/P&gt;&lt;P&gt;%mend append_zero;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The usual steps apply.&amp;nbsp; Get the program working for a single table, then apply macro language to repeat the program for a list of tables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Good luck.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Jul 2014 19:28:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Making-an-update/m-p/152297#M40081</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2014-07-01T19:28:58Z</dc:date>
    </item>
    <item>
      <title>Re: Making an update</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Making-an-update/m-p/152298#M40082</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Astounding thanks for your help... It will be an automatic process, in reality will be like this...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I real I have 100 or more tables from one libname (GPA), thus will need update (those with more than 6 months with no updates), thus, as I don't know how many table could contain, will be necessary&amp;nbsp; to use this macro for all tables available, you know? I mean, to make the macro language run reapeat automaticly until the last table.&lt;/P&gt;&lt;P&gt;"I want to create this process to run wherever I want with no changes".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So how to make this macro automaticly run (call) for all tables that could exist in one specific libname.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Obs. . sorry for my english...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Jul 2014 21:11:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Making-an-update/m-p/152298#M40082</guid>
      <dc:creator>Augusto</dc:creator>
      <dc:date>2014-07-01T21:11:43Z</dc:date>
    </item>
    <item>
      <title>Re: Making an update</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Making-an-update/m-p/152299#M40083</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The PROC APPEND trick can be reduced to just appending zero observations from the dataset to itself.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: navy; background: white; font-size: 10.0pt; font-family: 'Courier New';"&gt;&lt;STRONG&gt;proc&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;SPAN style="color: navy; background: white; font-size: 10.0pt; font-family: 'Courier New';"&gt;&lt;STRONG&gt;append&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;base&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;=x &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;data&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;=x(obs=&lt;/SPAN&gt;&lt;SPAN style="color: teal; background: white; font-size: 10.0pt; font-family: 'Courier New';"&gt;&lt;STRONG&gt;0&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;); &lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: navy; background: white; font-size: 10.0pt; font-family: 'Courier New';"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can query the table DICTIONARY.TABLES ( or the view SASHELP.VTABLE) to check the MODATE variable to find those that have not been modified in a while and use that list to generate the code to "touch" them.&amp;nbsp; I am not sure if the MODATE in the SAS metadata is actual datetime value that your archive/delete utility is using, but it should be close enough.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Personally I find it easiest to do this using a data step to write the generated code to a text file that is later run via a %INCLUDE statement.&amp;nbsp; That way I can easily debug the step that generates the file until I get the syntax right.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;SPAN style="font-size: 10pt; color: blue; background-color: white; background-position: initial initial; background-repeat: initial initial;"&gt;libname&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; color: black; background-color: white; background-position: initial initial; background-repeat: initial initial;"&gt; GPA &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; color: purple; background-color: white; background-position: initial initial; background-repeat: initial initial;"&gt;'path to GPA library'&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; color: black; background-color: white; background-position: initial initial; background-repeat: initial initial;"&gt;;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;SPAN style="font-size: 10pt; color: blue; background-color: white; background-position: initial initial; background-repeat: initial initial;"&gt;filename&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; color: black; background-color: white; background-position: initial initial; background-repeat: initial initial;"&gt; code &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; color: blue; background-color: white; background-position: initial initial; background-repeat: initial initial;"&gt;temp&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; color: black; background-color: white; background-position: initial initial; background-repeat: initial initial;"&gt;;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="color: navy; font-size: 10pt; background-color: white; font-family: 'courier new', courier; background-repeat: initial initial; background-position: initial initial;"&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;SPAN style="color: navy; background-color: white; font-size: 10pt; background-position: initial initial; background-repeat: initial initial;"&gt;&lt;STRONG&gt;data&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;SPAN style="font-size: 10pt; color: blue; background-color: white; background-position: initial initial; background-repeat: initial initial;"&gt;_null_&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; color: black; background-color: white; background-position: initial initial; background-repeat: initial initial;"&gt;;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; &lt;SPAN style="font-size: 10pt; color: blue; background-color: white; background-position: initial initial; background-repeat: initial initial;"&gt;set&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; color: black; background-color: white; background-position: initial initial; background-repeat: initial initial;"&gt; sashelp.vtable ;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; &lt;SPAN style="font-size: 10pt; color: blue; background-color: white; background-position: initial initial; background-repeat: initial initial;"&gt;where&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; color: black; background-color: white; background-position: initial initial; background-repeat: initial initial;"&gt; libname=&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; color: purple; background-color: white; background-position: initial initial; background-repeat: initial initial;"&gt;'GPA'&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; color: black; background-color: white; background-position: initial initial; background-repeat: initial initial;"&gt; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;SPAN style="font-size: 10pt; color: black; background-color: white; background-position: initial initial; background-repeat: initial initial;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; and modate &amp;lt;= intnx(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; color: purple; background-color: white; background-position: initial initial; background-repeat: initial initial;"&gt;'dtmonth'&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; color: black; background-color: white; background-position: initial initial; background-repeat: initial initial;"&gt;,datetime(),-&lt;/SPAN&gt;&lt;SPAN style="color: teal; background-color: white; font-size: 10pt; background-position: initial initial; background-repeat: initial initial;"&gt;&lt;STRONG&gt;5&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; color: black; background-color: white; background-position: initial initial; background-repeat: initial initial;"&gt;)&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10pt; font-family: 'courier new', courier; color: black; background-color: white; background-position: initial initial; background-repeat: initial initial;"&gt;&amp;nbsp; ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; &lt;SPAN style="font-size: 10pt; color: blue; background-color: white; background-position: initial initial; background-repeat: initial initial;"&gt;file&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; color: black; background-color: white; background-position: initial initial; background-repeat: initial initial;"&gt; code ;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;SPAN style="font-size: 10pt; color: black; background-color: white; background-position: initial initial; background-repeat: initial initial;"&gt;&amp;nbsp; dsname = catx(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; color: purple; background-color: white; background-position: initial initial; background-repeat: initial initial;"&gt;'.'&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; color: black; background-color: white; background-position: initial initial; background-repeat: initial initial;"&gt;,libname,memname);&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; &lt;SPAN style="font-size: 10pt; color: blue; background-color: white; background-position: initial initial; background-repeat: initial initial;"&gt;put&lt;/SPAN&gt; &lt;SPAN style="font-size: 10pt; color: purple; background-color: white; background-position: initial initial; background-repeat: initial initial;"&gt;'proc append base='&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; color: black; background-color: white; background-position: initial initial; background-repeat: initial initial;"&gt; dsname &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; color: purple; background-color: white; background-position: initial initial; background-repeat: initial initial;"&gt;'data='&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; color: black; background-color: white; background-position: initial initial; background-repeat: initial initial;"&gt; dsname &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; color: purple; background-color: white; background-position: initial initial; background-repeat: initial initial;"&gt;'(obs=0);run;'&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; color: black; background-color: white; background-position: initial initial; background-repeat: initial initial;"&gt; ;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;SPAN style="color: navy; background-color: white; font-size: 10pt; background-position: initial initial; background-repeat: initial initial;"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; color: black; background-color: white; background-position: initial initial; background-repeat: initial initial;"&gt;;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;SPAN style="font-size: 10pt; color: blue; background-color: white; background-position: initial initial; background-repeat: initial initial;"&gt;%include&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; color: black; background-color: white; background-position: initial initial; background-repeat: initial initial;"&gt; code / source2 ;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Jul 2014 00:28:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Making-an-update/m-p/152299#M40083</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2014-07-02T00:28:54Z</dc:date>
    </item>
  </channel>
</rss>

