<?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: Delete Datasets in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Delete-Datasets/m-p/938218#M368560</link>
    <description>&lt;P&gt;No macro needed. Assuming you want to delete from the Library named WORK, this is how to do it:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql noprint;
    select distinct memname into :zeros separated by ' ' from sashelp.vtable where nobs=0 and libname='WORK';
quit;

proc datasets library=work;
    delete &amp;amp;zeros;
run;
quit;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Naturally, if the Library name is different you have to modify the code above to refer to a different library. In SQL, the library name must be upper case. Also, the datasets are deleted without warning.&lt;/P&gt;</description>
    <pubDate>Mon, 05 Aug 2024 11:16:17 GMT</pubDate>
    <dc:creator>PaigeMiller</dc:creator>
    <dc:date>2024-08-05T11:16:17Z</dc:date>
    <item>
      <title>Delete Datasets</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Delete-Datasets/m-p/938216#M368558</link>
      <description>&lt;P&gt;I have a few datasets in my library and I want to delete datasets which has zero records , can anyone create macro to do that?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 05 Aug 2024 10:01:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Delete-Datasets/m-p/938216#M368558</guid>
      <dc:creator>KalaBhairava</dc:creator>
      <dc:date>2024-08-05T10:01:14Z</dc:date>
    </item>
    <item>
      <title>Re: Delete Datasets</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Delete-Datasets/m-p/938218#M368560</link>
      <description>&lt;P&gt;No macro needed. Assuming you want to delete from the Library named WORK, this is how to do it:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql noprint;
    select distinct memname into :zeros separated by ' ' from sashelp.vtable where nobs=0 and libname='WORK';
quit;

proc datasets library=work;
    delete &amp;amp;zeros;
run;
quit;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Naturally, if the Library name is different you have to modify the code above to refer to a different library. In SQL, the library name must be upper case. Also, the datasets are deleted without warning.&lt;/P&gt;</description>
      <pubDate>Mon, 05 Aug 2024 11:16:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Delete-Datasets/m-p/938218#M368560</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2024-08-05T11:16:17Z</dc:date>
    </item>
    <item>
      <title>Re: Delete Datasets</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Delete-Datasets/m-p/938219#M368561</link>
      <description>Thank you very much Sir, it is working.</description>
      <pubDate>Mon, 05 Aug 2024 11:34:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Delete-Datasets/m-p/938219#M368561</guid>
      <dc:creator>KalaBhairava</dc:creator>
      <dc:date>2024-08-05T11:34:20Z</dc:date>
    </item>
  </channel>
</rss>

