<?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 multiple data sets from list appear in a col in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Delete-multiple-data-sets-from-list-appear-in-a-col/m-p/832730#M329162</link>
    <description>&lt;P&gt;But, when you create the&amp;nbsp;&lt;SPAN&gt;tables_tbl data set, you specify the rules manually for what data sets are to be deleted?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sun, 11 Sep 2022 07:10:42 GMT</pubDate>
    <dc:creator>PeterClemmensen</dc:creator>
    <dc:date>2022-09-11T07:10:42Z</dc:date>
    <item>
      <title>Delete multiple data sets from list appear in a col</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Delete-multiple-data-sets-from-list-appear-in-a-col/m-p/832722#M329155</link>
      <description>&lt;P&gt;Hello&lt;/P&gt;
&lt;P&gt;I want to delete data sets that appear in column&amp;nbsp; "memname"&amp;nbsp; in data set&amp;nbsp;tables_tbl.&lt;/P&gt;
&lt;P&gt;What is the way to do it please?&lt;/P&gt;
&lt;P&gt;The only step that I know to do it to create data set that included the names of the data sets that I want to delete.&lt;/P&gt;
&lt;P&gt;Please note that I know to delete each data set manually using&amp;nbsp;PROC DELETE&amp;nbsp; &amp;nbsp;but the question is how to delete the data sets in one step&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
Data ttt1;
X=10;
Run;

Data ttt2;
X=15;
Run;

Data WWW1;
Z=10;
Run;

PROC SQL;
  CREATE TABLE tables_tbl AS
  SELECT *
  FROM dictionary.tables
  WHERE libname = 'WORK' and memname like '%TTT%'
;
QUIT;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 11 Sep 2022 05:10:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Delete-multiple-data-sets-from-list-appear-in-a-col/m-p/832722#M329155</guid>
      <dc:creator>Ronein</dc:creator>
      <dc:date>2022-09-11T05:10:08Z</dc:date>
    </item>
    <item>
      <title>Re: Delete multiple data sets from list appear in a col</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Delete-multiple-data-sets-from-list-appear-in-a-col/m-p/832723#M329156</link>
      <description>&lt;P&gt;From your own example, do this&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;Data ttt1;
X=10;
Run;

Data ttt2;
X=15;
Run;

Data WWW1;
Z=10;
Run;

PROC SQL noprint;
   select memname
   into :t separated by ' '
   from dictionary.tables
   WHERE libname = 'WORK' and memname like '%TTT%'
   ;
quit;

%put &amp;amp;t.;

proc datasets lib = work nolist;
   delete &amp;amp;t.;
quit;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 11 Sep 2022 05:51:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Delete-multiple-data-sets-from-list-appear-in-a-col/m-p/832723#M329156</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2022-09-11T05:51:04Z</dc:date>
    </item>
    <item>
      <title>Re: Delete multiple data sets from list appear in a col</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Delete-multiple-data-sets-from-list-appear-in-a-col/m-p/832724#M329157</link>
      <description>As I said the names of data sets can be with different names  so this solution is not as I wish</description>
      <pubDate>Sun, 11 Sep 2022 05:54:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Delete-multiple-data-sets-from-list-appear-in-a-col/m-p/832724#M329157</guid>
      <dc:creator>Ronein</dc:creator>
      <dc:date>2022-09-11T05:54:49Z</dc:date>
    </item>
    <item>
      <title>Re: Delete multiple data sets from list appear in a col</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Delete-multiple-data-sets-from-list-appear-in-a-col/m-p/832725#M329158</link>
      <description>Your question is how to delete all data sets in tables_tbl in one step. That is what my code does.&lt;BR /&gt;&lt;BR /&gt;Please be more specific about what data sets are to be deleted? Do they appear in a table?</description>
      <pubDate>Sun, 11 Sep 2022 06:03:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Delete-multiple-data-sets-from-list-appear-in-a-col/m-p/832725#M329158</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2022-09-11T06:03:27Z</dc:date>
    </item>
    <item>
      <title>Re: Delete multiple data sets from list appear in a col</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Delete-multiple-data-sets-from-list-appear-in-a-col/m-p/832727#M329159</link>
      <description>&lt;P&gt;Please see again the list of&amp;nbsp; data sets that I want to delete&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;Data ttt1;
X=10;
Run;
Data ttt2;
X=15;
Run;
Data WWW1;
Z=10;
Run;

data revenue_tbl;
input ID revenue;
cards;
1 100
2 200
;
Run;


PROC SQL;
  CREATE TABLE tables_tbl AS
  SELECT *
  FROM dictionary.tables
  WHERE libname = 'WORK' and  (memname like '%TTT%' OR memname='REVENUE_TBL'  OR  memname='WWW1')
;
QUIT;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 11 Sep 2022 06:15:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Delete-multiple-data-sets-from-list-appear-in-a-col/m-p/832727#M329159</guid>
      <dc:creator>Ronein</dc:creator>
      <dc:date>2022-09-11T06:15:05Z</dc:date>
    </item>
    <item>
      <title>Re: Delete multiple data sets from list appear in a col</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Delete-multiple-data-sets-from-list-appear-in-a-col/m-p/832728#M329160</link>
      <description>How is this any different from your initial post? Once again, the data set names can be different than what you post, correct?</description>
      <pubDate>Sun, 11 Sep 2022 06:19:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Delete-multiple-data-sets-from-list-appear-in-a-col/m-p/832728#M329160</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2022-09-11T06:19:10Z</dc:date>
    </item>
    <item>
      <title>Re: Delete multiple data sets from list appear in a col</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Delete-multiple-data-sets-from-list-appear-in-a-col/m-p/832729#M329161</link>
      <description>The task is to tell sas to delete all data sets appear in column   "memname"  in data set tables_tbl.&lt;BR /&gt;No need to say what to delete&lt;BR /&gt;need to say to delete all</description>
      <pubDate>Sun, 11 Sep 2022 06:31:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Delete-multiple-data-sets-from-list-appear-in-a-col/m-p/832729#M329161</guid>
      <dc:creator>Ronein</dc:creator>
      <dc:date>2022-09-11T06:31:56Z</dc:date>
    </item>
    <item>
      <title>Re: Delete multiple data sets from list appear in a col</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Delete-multiple-data-sets-from-list-appear-in-a-col/m-p/832730#M329162</link>
      <description>&lt;P&gt;But, when you create the&amp;nbsp;&lt;SPAN&gt;tables_tbl data set, you specify the rules manually for what data sets are to be deleted?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 11 Sep 2022 07:10:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Delete-multiple-data-sets-from-list-appear-in-a-col/m-p/832730#M329162</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2022-09-11T07:10:42Z</dc:date>
    </item>
    <item>
      <title>Re: Delete multiple data sets from list appear in a col</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Delete-multiple-data-sets-from-list-appear-in-a-col/m-p/832735#M329165</link>
      <description>&lt;P&gt;Simple:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql noprint;
select catx(".",libname,memname) into :dslist separated by " "
from tables_tbl;
quit;

proc delete data=&amp;amp;dslist.;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 11 Sep 2022 09:53:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Delete-multiple-data-sets-from-list-appear-in-a-col/m-p/832735#M329165</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2022-09-11T09:53:54Z</dc:date>
    </item>
  </channel>
</rss>

