<?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: Functions which helps cleaning temporary files from work and .lck files in sas in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Functions-which-helps-cleaning-temporary-files-from-work-and-lck/m-p/777344#M247284</link>
    <description>Thank you Chris, but this question is also important as sometimes you will notice that the .lck or the temporary files from work is not deleted even if the job is succ or fail which can cause space issues. So I wanted to understand how the SAS work.</description>
    <pubDate>Fri, 29 Oct 2021 16:13:24 GMT</pubDate>
    <dc:creator>Nishant2000</dc:creator>
    <dc:date>2021-10-29T16:13:24Z</dc:date>
    <item>
      <title>Functions which helps cleaning temporary files from work and .lck files in sas</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Functions-which-helps-cleaning-temporary-files-from-work-and-lck/m-p/777176#M247221</link>
      <description>&lt;P&gt;Hi All,&lt;BR /&gt;I do understand that when we run a query in SAS all the temporary tables created under the work library are deleted automatically once the code/session ends, but I wanted to know how does it get deleted? I mean, what function runs in the backend which does this activity, and how it is called, as we don't write any such function in our code.&amp;nbsp;&lt;/P&gt;&lt;P&gt;On similar lines, we do understand a&amp;nbsp; .lck file is created when the job is executing and if the code completes the .lck file is renamed from&amp;nbsp;&lt;SPAN&gt;sas7bdat.lck to sas7bdat, or if failure the .lck file is deleted. So, my question is how does SAS perform these kinds of activities? And how are the functions called automatically when we don't write any such query in SAS code.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 29 Oct 2021 07:05:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Functions-which-helps-cleaning-temporary-files-from-work-and-lck/m-p/777176#M247221</guid>
      <dc:creator>Nishant2000</dc:creator>
      <dc:date>2021-10-29T07:05:31Z</dc:date>
    </item>
    <item>
      <title>Re: Functions which helps cleaning temporary files from work and .lck files in sas</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Functions-which-helps-cleaning-temporary-files-from-work-and-lck/m-p/777182#M247224</link>
      <description>&lt;P&gt;That's part of how SAS works.&lt;/P&gt;
&lt;P&gt;There many more interesting questions if you want to look under the hood.&lt;/P&gt;
&lt;P&gt;For example you can look at proc sort and its workings (use the DETAILS option) . Or how to make best use of indexes. Or how proc sql merges tables (use the _METHOD option).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 29 Oct 2021 09:20:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Functions-which-helps-cleaning-temporary-files-from-work-and-lck/m-p/777182#M247224</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2021-10-29T09:20:31Z</dc:date>
    </item>
    <item>
      <title>Re: Functions which helps cleaning temporary files from work and .lck files in sas</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Functions-which-helps-cleaning-temporary-files-from-work-and-lck/m-p/777224#M247238</link>
      <description>&lt;P&gt;When SAS terminates gracefully, it removes the whole directory of the WORK library with one system call (think of &lt;FONT face="courier new,courier"&gt;rm -rf&lt;/FONT&gt; in UNIX).&lt;/P&gt;
&lt;P&gt;For directories that remain when a SAS session crashes, SAS provides the cleanwork utility, which a diligent SAS admin will run periodically (scheduled!) on the root work directory.&lt;/P&gt;
&lt;P&gt;Similarly, removing/renaming of files during data steps is done by the SAS executable as part of the data step engine; these are internal calls you do not have access to, and als do not need.&lt;/P&gt;
&lt;P&gt;If you manually need to work with other files, SAS provides functions like FDELETE for use in data step code.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Keep in mind that data steps are compiled; the data step language is a very high-level language, which means that the compiler does a lot of work for you that you would have to do yourself in other languages (think of the difference between a SQL query sent to a DBMS and coding the same action in C or Go).&lt;/P&gt;</description>
      <pubDate>Fri, 29 Oct 2021 10:06:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Functions-which-helps-cleaning-temporary-files-from-work-and-lck/m-p/777224#M247238</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2021-10-29T10:06:24Z</dc:date>
    </item>
    <item>
      <title>Re: Functions which helps cleaning temporary files from work and .lck files in sas</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Functions-which-helps-cleaning-temporary-files-from-work-and-lck/m-p/777344#M247284</link>
      <description>Thank you Chris, but this question is also important as sometimes you will notice that the .lck or the temporary files from work is not deleted even if the job is succ or fail which can cause space issues. So I wanted to understand how the SAS work.</description>
      <pubDate>Fri, 29 Oct 2021 16:13:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Functions-which-helps-cleaning-temporary-files-from-work-and-lck/m-p/777344#M247284</guid>
      <dc:creator>Nishant2000</dc:creator>
      <dc:date>2021-10-29T16:13:24Z</dc:date>
    </item>
    <item>
      <title>Re: Functions which helps cleaning temporary files from work and .lck files in sas</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Functions-which-helps-cleaning-temporary-files-from-work-and-lck/m-p/777461#M247350</link>
      <description>&lt;P&gt;&lt;EM&gt;&amp;gt; not deleted even if the job is succ&amp;nbsp;&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;SAS always deletes the works folder when closing normally. Always. Unless you choose otherwise and the WORKTERM option is used.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;&amp;gt; which can cause space issues&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;this might interest you:&amp;nbsp; &amp;nbsp; &lt;A href="https://support.sas.com/kb/8/786.html" target="_blank"&gt;https://support.sas.com/kb/8/786.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 30 Oct 2021 06:23:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Functions-which-helps-cleaning-temporary-files-from-work-and-lck/m-p/777461#M247350</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2021-10-30T06:23:36Z</dc:date>
    </item>
    <item>
      <title>Re: Functions which helps cleaning temporary files from work and .lck files in sas</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Functions-which-helps-cleaning-temporary-files-from-work-and-lck/m-p/777468#M247355</link>
      <description>&lt;P&gt;WORK directories (and the files within) are always removed on graceful termination. For remnants of crashed,&amp;nbsp; sessions, use cleanwork.&lt;/P&gt;
&lt;P&gt;Crashed sessions are in no way "normal" and need to be investigated.&lt;/P&gt;</description>
      <pubDate>Sat, 30 Oct 2021 07:38:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Functions-which-helps-cleaning-temporary-files-from-work-and-lck/m-p/777468#M247355</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2021-10-30T07:38:02Z</dc:date>
    </item>
  </channel>
</rss>

