<?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: Can not delete the log file while SAS program is open. in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Can-not-delete-the-log-file-while-SAS-program-is-open/m-p/869755#M343557</link>
    <description>Or try this one :&lt;BR /&gt;&lt;BR /&gt;dm 'log; file "c:\temp\ReportPrint.log" replace;' ;</description>
    <pubDate>Fri, 14 Apr 2023 11:44:54 GMT</pubDate>
    <dc:creator>Ksharp</dc:creator>
    <dc:date>2023-04-14T11:44:54Z</dc:date>
    <item>
      <title>Can not delete the log file while SAS program is open.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Can-not-delete-the-log-file-while-SAS-program-is-open/m-p/869559#M343455</link>
      <description>&lt;P&gt;I am running a program that&amp;nbsp; generates a big log while running, so I decided to use the 'PROC PRINTTO LOG.' However, at the end of the run,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; I want to delete this file after checking for errors before rerunning. Unfortunately, everything is going fine, but I cannot delete the log file while the program opens in sas9.4. Is there an option I can delete even if the program is available? (it looks like I need an option like 'Libname xx clear;)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This is the pop message (like any other files open at some place while deleting it)&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;" the action cannot be completed because the file is open in sas 9.4"&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Apr 2023 13:25:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Can-not-delete-the-log-file-while-SAS-program-is-open/m-p/869559#M343455</guid>
      <dc:creator>SASuserlot</dc:creator>
      <dc:date>2023-04-13T13:25:13Z</dc:date>
    </item>
    <item>
      <title>Re: Can not delete the log file while SAS program is open.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Can-not-delete-the-log-file-while-SAS-program-is-open/m-p/869565#M343456</link>
      <description>&lt;P&gt;You need to close the file after you have created it. You do this via the SAS command&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc printto; run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;before you try to delete it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Alternatively, don't delete it but tell PROC PRINTTO to just start a new file the next time you run the program.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc printto new log= ... ;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Apr 2023 13:31:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Can-not-delete-the-log-file-while-SAS-program-is-open/m-p/869565#M343456</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2023-04-13T13:31:56Z</dc:date>
    </item>
    <item>
      <title>Re: Can not delete the log file while SAS program is open.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Can-not-delete-the-log-file-while-SAS-program-is-open/m-p/869579#M343463</link>
      <description>&lt;P&gt;It worked Thank you very much for your help.&lt;/P&gt;</description>
      <pubDate>Thu, 13 Apr 2023 13:56:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Can-not-delete-the-log-file-while-SAS-program-is-open/m-p/869579#M343463</guid>
      <dc:creator>SASuserlot</dc:creator>
      <dc:date>2023-04-13T13:56:51Z</dc:date>
    </item>
    <item>
      <title>Re: Can not delete the log file while SAS program is open.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Can-not-delete-the-log-file-while-SAS-program-is-open/m-p/869755#M343557</link>
      <description>Or try this one :&lt;BR /&gt;&lt;BR /&gt;dm 'log; file "c:\temp\ReportPrint.log" replace;' ;</description>
      <pubDate>Fri, 14 Apr 2023 11:44:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Can-not-delete-the-log-file-while-SAS-program-is-open/m-p/869755#M343557</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2023-04-14T11:44:54Z</dc:date>
    </item>
  </channel>
</rss>

