<?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 delete all data sets that start with name &amp;quot;ABC&amp;quot;  if they contain number of rows=0 in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/delete-all-data-sets-that-start-with-name-quot-ABC-quot-if-they/m-p/614319#M179544</link>
    <description>&lt;P&gt;Hello&lt;/P&gt;
&lt;P&gt;What is the way (code) to delete all data sets that start with name "ABC"&amp;nbsp; if they contain number of rows=0?&lt;/P&gt;
&lt;P&gt;Let's say that each day there are many data sets start with name ABC.&lt;/P&gt;
&lt;P&gt;Some of the data sets have 0 rows and we need to delete them.&lt;/P&gt;
&lt;P&gt;For example:&lt;/P&gt;
&lt;P&gt;ABC20191201&amp;nbsp; ,ABC20191202 ,ABC20191203,ABC201912014,.....and so on.&lt;/P&gt;
&lt;P&gt;Is there a clever way to tell SAS to delete each data set that contain 0 rows (from series of data sets names ABC..)?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sun, 29 Dec 2019 20:54:28 GMT</pubDate>
    <dc:creator>Ronein</dc:creator>
    <dc:date>2019-12-29T20:54:28Z</dc:date>
    <item>
      <title>delete all data sets that start with name "ABC"  if they contain number of rows=0</title>
      <link>https://communities.sas.com/t5/SAS-Programming/delete-all-data-sets-that-start-with-name-quot-ABC-quot-if-they/m-p/614319#M179544</link>
      <description>&lt;P&gt;Hello&lt;/P&gt;
&lt;P&gt;What is the way (code) to delete all data sets that start with name "ABC"&amp;nbsp; if they contain number of rows=0?&lt;/P&gt;
&lt;P&gt;Let's say that each day there are many data sets start with name ABC.&lt;/P&gt;
&lt;P&gt;Some of the data sets have 0 rows and we need to delete them.&lt;/P&gt;
&lt;P&gt;For example:&lt;/P&gt;
&lt;P&gt;ABC20191201&amp;nbsp; ,ABC20191202 ,ABC20191203,ABC201912014,.....and so on.&lt;/P&gt;
&lt;P&gt;Is there a clever way to tell SAS to delete each data set that contain 0 rows (from series of data sets names ABC..)?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 29 Dec 2019 20:54:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/delete-all-data-sets-that-start-with-name-quot-ABC-quot-if-they/m-p/614319#M179544</guid>
      <dc:creator>Ronein</dc:creator>
      <dc:date>2019-12-29T20:54:28Z</dc:date>
    </item>
    <item>
      <title>Re: delete all data sets that start with name "ABC"  if they contain number of rows=0</title>
      <link>https://communities.sas.com/t5/SAS-Programming/delete-all-data-sets-that-start-with-name-quot-ABC-quot-if-they/m-p/614321#M179546</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/159549"&gt;@Ronein&lt;/a&gt;&amp;nbsp; Here is a demo&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
/*0 rows samples*/

data ABC20191201 ABC20191202 ABC20191203 ABC201912014;
stop;
set sashelp.class;
run;
/*a sample that is not 0 rows*/
data ABC2345;
set sashelp.class;
run;

data _null_;
set sashelp.vtable(keep=libname memname nobs);
where libname='WORK' and memname=:'ABC';
if nobs=0;
call execute(cats('proc delete data=',memname,';run;'));
run;

&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 29 Dec 2019 21:55:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/delete-all-data-sets-that-start-with-name-quot-ABC-quot-if-they/m-p/614321#M179546</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2019-12-29T21:55:49Z</dc:date>
    </item>
  </channel>
</rss>

