<?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 Programatically delete permanent dataset in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Programatically-delete-permanent-dataset/m-p/189505#M14520</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;HEllo SAS EG users,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I intend to use program to delete permanent dataset once I read it into WORK library so that I can process new data and save it as the same permanent dataset at end of the session.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What is the best way to:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;a) Replace existing permanent dataset using datastep?&lt;/P&gt;&lt;P&gt;OR&lt;/P&gt;&lt;P&gt;b) Delete existing permanent dataset using datastep?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Dhanashree&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 27 Feb 2014 21:00:02 GMT</pubDate>
    <dc:creator>noobs</dc:creator>
    <dc:date>2014-02-27T21:00:02Z</dc:date>
    <item>
      <title>Programatically delete permanent dataset</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Programatically-delete-permanent-dataset/m-p/189505#M14520</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;HEllo SAS EG users,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I intend to use program to delete permanent dataset once I read it into WORK library so that I can process new data and save it as the same permanent dataset at end of the session.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What is the best way to:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;a) Replace existing permanent dataset using datastep?&lt;/P&gt;&lt;P&gt;OR&lt;/P&gt;&lt;P&gt;b) Delete existing permanent dataset using datastep?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Dhanashree&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Feb 2014 21:00:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Programatically-delete-permanent-dataset/m-p/189505#M14520</guid>
      <dc:creator>noobs</dc:creator>
      <dc:date>2014-02-27T21:00:02Z</dc:date>
    </item>
    <item>
      <title>Re: Programatically delete permanent dataset</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Programatically-delete-permanent-dataset/m-p/189506#M14521</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You don't actually need to delete your permanent dataset to replace it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Assume you have mylib.testds&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The following code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data work.testds;&lt;/P&gt;&lt;P&gt;set mylib.testds;&lt;/P&gt;&lt;P&gt;... processing ...&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data mylib.testds;&lt;/P&gt;&lt;P&gt;set work.testds;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;will replace your permanent dataset.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, if you want to delete it, I like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc sql;&lt;/P&gt;&lt;P&gt;drop table mylib.testds;&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Feb 2014 23:09:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Programatically-delete-permanent-dataset/m-p/189506#M14521</guid>
      <dc:creator>TomKari</dc:creator>
      <dc:date>2014-02-27T23:09:52Z</dc:date>
    </item>
    <item>
      <title>Re: Programatically delete permanent dataset</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Programatically-delete-permanent-dataset/m-p/189507#M14522</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What happens if your process fails in the middle, ie power outage, coffee spills on CPU, data you expect doesn't exist &lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://communities.sas.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Feb 2014 23:35:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Programatically-delete-permanent-dataset/m-p/189507#M14522</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2014-02-27T23:35:35Z</dc:date>
    </item>
    <item>
      <title>Re: Programatically delete permanent dataset</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Programatically-delete-permanent-dataset/m-p/189508#M14523</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Party pooper! :smileysilly:&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Feb 2014 00:30:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Programatically-delete-permanent-dataset/m-p/189508#M14523</guid>
      <dc:creator>TomKari</dc:creator>
      <dc:date>2014-02-28T00:30:13Z</dc:date>
    </item>
    <item>
      <title>Re: Programatically delete permanent dataset</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Programatically-delete-permanent-dataset/m-p/189509#M14524</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;For the error situation, SAS has an option for that (of course!).&amp;nbsp; You can use &lt;A href="http://support.sas.com/documentation/cdl/en/lesysoptsref/66899/HTML/default/viewer.htm#n16q7psnp46obtn1hqbni4o7f6qg.htm"&gt;the NOREPLACE option to prevent the accidental replacement of a data set when an error occurs&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And as far as deleting a data set outright, let's not forget about &lt;A href="http://blogs.sas.com/content/sasdummy/2013/07/08/proc-delete-its-not-dead-yet/"&gt;our recently resurrected friend, PROC DELETE&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Chris&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Feb 2014 14:10:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Programatically-delete-permanent-dataset/m-p/189509#M14524</guid>
      <dc:creator>ChrisHemedinger</dc:creator>
      <dc:date>2014-02-28T14:10:17Z</dc:date>
    </item>
    <item>
      <title>Re: Programatically delete permanent dataset</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Programatically-delete-permanent-dataset/m-p/189510#M14525</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Oh my goodness!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have my original SAS manual, from back when it was one book and ran on the mainframe, and I've NEVER heard of PROC DELETE!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It must work for the CIA...or the NSA...or the KGB!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've wanted this functionality for YEARS, and it was under my nose the whole time. Gack!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 01 Mar 2014 01:36:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Programatically-delete-permanent-dataset/m-p/189510#M14525</guid>
      <dc:creator>TomKari</dc:creator>
      <dc:date>2014-03-01T01:36:37Z</dc:date>
    </item>
    <item>
      <title>Re: Programatically delete permanent dataset</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Programatically-delete-permanent-dataset/m-p/189511#M14526</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;A.&lt;/P&gt;&lt;P&gt;That is how SAS already does it.&lt;/P&gt;&lt;P&gt;If you write:&lt;/P&gt;&lt;P&gt;data mylib.x ;&lt;/P&gt;&lt;P&gt;&amp;nbsp; set work.x;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;SAS will create a whole new file named x.sas7bdat in the directory that MYLIB points to.&amp;nbsp; Once it is finished it then deletes the original x.sas7bdat and renames the file that it created.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 01 Mar 2014 04:41:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Programatically-delete-permanent-dataset/m-p/189511#M14526</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2014-03-01T04:41:11Z</dc:date>
    </item>
  </channel>
</rss>

