<?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: Clearing the work library on a Workspace in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Clearing-the-work-library-on-a-Workspace/m-p/521518#M32679</link>
    <description>&lt;P&gt;Thanks Chris. I have been exploring the libref object and nothing explicitly lets me list what is there (so I can loop and delete). Getting it confirmed that it is datasets is what I needed.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;See you at SGF.&lt;/P&gt;</description>
    <pubDate>Fri, 14 Dec 2018 15:55:02 GMT</pubDate>
    <dc:creator>AlanC</dc:creator>
    <dc:date>2018-12-14T15:55:02Z</dc:date>
    <item>
      <title>Clearing the work library on a Workspace</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Clearing-the-work-library-on-a-Workspace/m-p/521503#M32675</link>
      <description>&lt;P&gt;I did not find a good place to ask this question so I figured EG would be the best location.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When we instantiate a new Workspace object in C#:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;var ws = new Workspace();&lt;/P&gt;
&lt;P&gt;var ls = ws.LanguageService&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;...and then we execute SAS code...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How do we then clear the work library that the ws used? I could submit a proc datasets but I figured there is probably a programmatic way to do it.&lt;/P&gt;</description>
      <pubDate>Fri, 14 Dec 2018 15:35:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Clearing-the-work-library-on-a-Workspace/m-p/521503#M32675</guid>
      <dc:creator>AlanC</dc:creator>
      <dc:date>2018-12-14T15:35:48Z</dc:date>
    </item>
    <item>
      <title>Re: Clearing the work library on a Workspace</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Clearing-the-work-library-on-a-Workspace/m-p/521505#M32676</link>
      <description>&lt;P&gt;proc datasets with kill IS the programmatic way to go.&lt;/P&gt;</description>
      <pubDate>Fri, 14 Dec 2018 15:40:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Clearing-the-work-library-on-a-Workspace/m-p/521505#M32676</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2018-12-14T15:40:29Z</dc:date>
    </item>
    <item>
      <title>Re: Clearing the work library on a Workspace</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Clearing-the-work-library-on-a-Workspace/m-p/521508#M32677</link>
      <description>&lt;P&gt;In SAS language but it may not be the object way. For example, EG add-ins.&lt;/P&gt;</description>
      <pubDate>Fri, 14 Dec 2018 15:43:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Clearing-the-work-library-on-a-Workspace/m-p/521508#M32677</guid>
      <dc:creator>AlanC</dc:creator>
      <dc:date>2018-12-14T15:43:57Z</dc:date>
    </item>
    <item>
      <title>Re: Clearing the work library on a Workspace</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Clearing-the-work-library-on-a-Workspace/m-p/521511#M32678</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13798"&gt;@AlanC&lt;/a&gt;&amp;nbsp;- actually, I think the best way is probably&amp;nbsp;&lt;STRONG&gt;proc datasets lib=work kill&lt;/STRONG&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There isn't any other method on the Workspace that abstracts this operation.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you think that clearing the entire WORK library might have a side effect (removing something that you didn't explicitly create), then I recommend creating a new library that's located in a subfolder of the WORK space.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;/* create a new lib as a subfolder of WORK */
options dlcreatedir;
libname mywork "%sysfunc(getoption(WORK))/mywork";

/* optional: one-level names will default to MYWORK lib */
options user=mywork;

/* Use and enjoy */
data one two three;
 set sashelp.class;
run;

/* cleanup MYWORK before the next task */
proc datasets nolist nodetails lib=mywork kill;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 14 Dec 2018 15:48:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Clearing-the-work-library-on-a-Workspace/m-p/521511#M32678</guid>
      <dc:creator>ChrisHemedinger</dc:creator>
      <dc:date>2018-12-14T15:48:18Z</dc:date>
    </item>
    <item>
      <title>Re: Clearing the work library on a Workspace</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Clearing-the-work-library-on-a-Workspace/m-p/521518#M32679</link>
      <description>&lt;P&gt;Thanks Chris. I have been exploring the libref object and nothing explicitly lets me list what is there (so I can loop and delete). Getting it confirmed that it is datasets is what I needed.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;See you at SGF.&lt;/P&gt;</description>
      <pubDate>Fri, 14 Dec 2018 15:55:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Clearing-the-work-library-on-a-Workspace/m-p/521518#M32679</guid>
      <dc:creator>AlanC</dc:creator>
      <dc:date>2018-12-14T15:55:02Z</dc:date>
    </item>
    <item>
      <title>Re: Clearing the work library on a Workspace</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Clearing-the-work-library-on-a-Workspace/m-p/521537#M32680</link>
      <description>&lt;P&gt;If you're working with SAS custom tasks, then the Task Toolkit has a&amp;nbsp;SasData class/namespace that can help you to enumerate all of these members.&amp;nbsp; See &lt;A href="https://github.com/cjdinger/SasDataExample" target="_self"&gt;this GitHub project for examples&lt;/A&gt;.&amp;nbsp; Behind the scenes, these classes are using the SAS DICTIONARY tables to discover libraries, data sets, and their properties.&amp;nbsp; The libref object in IOM is pretty limited and tricky to use.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;These classes don't offer a&amp;nbsp;&lt;STRONG&gt;delete&lt;/STRONG&gt; method though.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Chris&lt;/P&gt;</description>
      <pubDate>Fri, 14 Dec 2018 16:08:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Clearing-the-work-library-on-a-Workspace/m-p/521537#M32680</guid>
      <dc:creator>ChrisHemedinger</dc:creator>
      <dc:date>2018-12-14T16:08:57Z</dc:date>
    </item>
    <item>
      <title>Re: Clearing the work library on a Workspace</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Clearing-the-work-library-on-a-Workspace/m-p/521547#M32683</link>
      <description>&lt;P&gt;I am instantiating n number of&amp;nbsp; workspaces and enqueuing/dequeuing them, then reusing them. This saves the reinstantiation cost so I need the workspace cleared after each language use.&lt;/P&gt;</description>
      <pubDate>Fri, 14 Dec 2018 16:34:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Clearing-the-work-library-on-a-Workspace/m-p/521547#M32683</guid>
      <dc:creator>AlanC</dc:creator>
      <dc:date>2018-12-14T16:34:55Z</dc:date>
    </item>
  </channel>
</rss>

