<?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 Deleting FILTER_FOR_ work datasets in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Deleting-FILTER-FOR-work-datasets/m-p/164781#M12698</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Gday,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We are running Enterprise Guide 5.1 on a Windows based server.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have some users that like to the the Filter and Sort task.&amp;nbsp; I absolutely hate this as it puts locks on datasets (whilst typing this, it occurred to me that I could disable access to the Filter and Sort task, but I don't really want to do that), so when my daily jobs run, if there is a lock on one of the early datasets, everything fails, and I have to run everything during the workday.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there a way to delete the datasets that typically start with FILTER_FOR_ (whatever the table was called) at the end of each day?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is it possible in SAS?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I wouldn't want it just doing the deletion for my account, but every user that has a session open overnight.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Two approaches pop into my mind:&lt;/P&gt;&lt;P&gt;* Run a script that crawls through all the work directories and looks for any file that starts with FILTER_FOR and deletes them (my dos/shell scripting is very basic at best)&lt;/P&gt;&lt;P&gt;* Schedule a query each night in SAS that deletes these files, PROC DELETE/DATASET for example (I wouldn't know how to have this run against all WORK directories though)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does anyone have any other suggestions, or has something like this implemented?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 10 Nov 2014 22:27:48 GMT</pubDate>
    <dc:creator>JohnT</dc:creator>
    <dc:date>2014-11-10T22:27:48Z</dc:date>
    <item>
      <title>Deleting FILTER_FOR_ work datasets</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Deleting-FILTER-FOR-work-datasets/m-p/164781#M12698</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Gday,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We are running Enterprise Guide 5.1 on a Windows based server.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have some users that like to the the Filter and Sort task.&amp;nbsp; I absolutely hate this as it puts locks on datasets (whilst typing this, it occurred to me that I could disable access to the Filter and Sort task, but I don't really want to do that), so when my daily jobs run, if there is a lock on one of the early datasets, everything fails, and I have to run everything during the workday.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there a way to delete the datasets that typically start with FILTER_FOR_ (whatever the table was called) at the end of each day?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is it possible in SAS?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I wouldn't want it just doing the deletion for my account, but every user that has a session open overnight.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Two approaches pop into my mind:&lt;/P&gt;&lt;P&gt;* Run a script that crawls through all the work directories and looks for any file that starts with FILTER_FOR and deletes them (my dos/shell scripting is very basic at best)&lt;/P&gt;&lt;P&gt;* Schedule a query each night in SAS that deletes these files, PROC DELETE/DATASET for example (I wouldn't know how to have this run against all WORK directories though)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does anyone have any other suggestions, or has something like this implemented?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Nov 2014 22:27:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Deleting-FILTER-FOR-work-datasets/m-p/164781#M12698</guid>
      <dc:creator>JohnT</dc:creator>
      <dc:date>2014-11-10T22:27:48Z</dc:date>
    </item>
    <item>
      <title>Re: Deleting FILTER_FOR_ work datasets</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Deleting-FILTER-FOR-work-datasets/m-p/164782#M12699</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I thought about using the dictionary views/tables in the SASHELP library.&amp;nbsp; I wasn't able to find WORK sessions for other users, just my current session.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried a script, and I think it works.&amp;nbsp; I have it scheduled to run at 9pm every night.&amp;nbsp; This is what I ended up with:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #008000; background-color: #ffffff;"&gt;*delete filter_for_ datasets that can cause locks on data;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #008000; background-color: #ffffff;"&gt;*from;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #008000; background-color: #ffffff;"&gt;&lt;SPAN&gt;*&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://techie-buzz.com/tips-and-tricks/recursively-delete-files-in-folders-and-sub-folders-using-command-prompt.html;"&gt;http://techie-buzz.com/tips-and-tricks/recursively-delete-files-in-folders-and-sub-folders-using-command-prompt.html;&lt;/A&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;x&lt;/SPAN&gt; &lt;SPAN style="color: #800080; background-color: #ffffff;"&gt;'w:'&lt;/SPAN&gt;; &lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;x&lt;/SPAN&gt; &lt;SPAN style="color: #800080; background-color: #ffffff;"&gt;'cd W:\SASWORK\temp'&lt;/SPAN&gt;; &lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;x&lt;/SPAN&gt; &lt;SPAN style="color: #800080; background-color: #ffffff;"&gt;'del /s filter_for_*.sas7bdat'&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pretty simple solution in the end I think, not particularly elegant, but it gets the job done.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm still interested if there is a better solution to this though?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Nov 2014 00:49:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Deleting-FILTER-FOR-work-datasets/m-p/164782#M12699</guid>
      <dc:creator>JohnT</dc:creator>
      <dc:date>2014-11-11T00:49:48Z</dc:date>
    </item>
  </channel>
</rss>

