<?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 &amp;quot;File is in use&amp;quot; when creating ODS HTML in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/quot-File-is-in-use-quot-when-creating-ODS-HTML/m-p/31576#M4710</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I created a file using the following code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ods html file='C:\temp.html' style=meadow;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc print data=sashelp.class;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ods html close;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I then opened the file in Read Only mode and tried to re-run my SAS code and got the same error.&lt;/P&gt;&lt;P&gt; AFAIK SAS can't replace the file while its open so someone has the file open when you're trying to rewrite the file. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Not sure about the windows system process.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 18 Jan 2012 01:25:23 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2012-01-18T01:25:23Z</dc:date>
    <item>
      <title>"File is in use" when creating ODS HTML</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/quot-File-is-in-use-quot-when-creating-ODS-HTML/m-p/31571#M4705</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;A scheduled job creates an ODS HTML file with a table of contents five times daily, with the following error occurring 11 times over the last 150 executions:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "ERROR: File is in use"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;pointing to the HTML body file. If I re-run the report, the file is usually (but not always) open for write by the time I detect the error. There's at least 35 minutes between any two executions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The destination directory (Windows XP) is restricted to read-only for all clients, so I suspect that my report job might be the culprit. Any idea as to how SAS might be leaving a file open, or why ODS HTML CLOSE wouldn't assure a close? Or should I suspect something else?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Jan 2012 22:53:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/quot-File-is-in-use-quot-when-creating-ODS-HTML/m-p/31571#M4705</guid>
      <dc:creator>GTickner</dc:creator>
      <dc:date>2012-01-17T22:53:54Z</dc:date>
    </item>
    <item>
      <title>"File is in use" when creating ODS HTML</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/quot-File-is-in-use-quot-when-creating-ODS-HTML/m-p/31572#M4706</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You didn't mention which version of SAS you were using thus the following may or may not be relevant: &lt;A href="http://support.sas.com/kb/8/565.html"&gt;http://support.sas.com/kb/8/565.html&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Jan 2012 23:03:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/quot-File-is-in-use-quot-when-creating-ODS-HTML/m-p/31572#M4706</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2012-01-17T23:03:15Z</dc:date>
    </item>
    <item>
      <title>"File is in use" when creating ODS HTML</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/quot-File-is-in-use-quot-when-creating-ODS-HTML/m-p/31573#M4707</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; I'm using SAS 9.2 under Windows XP. I had seen the reference, but it appears relevant to Z/OS only?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Jan 2012 23:18:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/quot-File-is-in-use-quot-when-creating-ODS-HTML/m-p/31573#M4707</guid>
      <dc:creator>GTickner</dc:creator>
      <dc:date>2012-01-17T23:18:21Z</dc:date>
    </item>
    <item>
      <title>"File is in use" when creating ODS HTML</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/quot-File-is-in-use-quot-when-creating-ODS-HTML/m-p/31574#M4708</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I might be misunderstanding, but are you trying to write the same file the that is a 'read only' for clients? &lt;/P&gt;&lt;P&gt;Even if someone didn't have write access having a file open in read only would cause issues for SAS I'd guess. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ideally you should be creating the file somewhere then calling a second job that copies the relevant files to the read only location probably using X commands upon successful completion of the first file. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Jan 2012 00:04:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/quot-File-is-in-use-quot-when-creating-ODS-HTML/m-p/31574#M4708</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2012-01-18T00:04:27Z</dc:date>
    </item>
    <item>
      <title>"File is in use" when creating ODS HTML</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/quot-File-is-in-use-quot-when-creating-ODS-HTML/m-p/31575#M4709</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The directory in which the file resides is read-only for clients (to prevent them from locking the file), but I have full control. 93% of the time, my scheduled job rewrites the file without problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your idea of creating a local copy and copying to the public location might be a good one for more than one reason, but I don't see how it solves the problem of the file lock. If something in SAS is locking the file (and I don't know where else it comes from), then the lock will affect the local copy. If it's a network problem, then COPYFILE will be affected.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks, though; it gives me something to try.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Jan 2012 00:30:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/quot-File-is-in-use-quot-when-creating-ODS-HTML/m-p/31575#M4709</guid>
      <dc:creator>GTickner</dc:creator>
      <dc:date>2012-01-18T00:30:45Z</dc:date>
    </item>
    <item>
      <title>"File is in use" when creating ODS HTML</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/quot-File-is-in-use-quot-when-creating-ODS-HTML/m-p/31576#M4710</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I created a file using the following code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ods html file='C:\temp.html' style=meadow;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc print data=sashelp.class;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ods html close;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I then opened the file in Read Only mode and tried to re-run my SAS code and got the same error.&lt;/P&gt;&lt;P&gt; AFAIK SAS can't replace the file while its open so someone has the file open when you're trying to rewrite the file. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Not sure about the windows system process.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Jan 2012 01:25:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/quot-File-is-in-use-quot-when-creating-ODS-HTML/m-p/31576#M4710</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2012-01-18T01:25:23Z</dc:date>
    </item>
    <item>
      <title>"File is in use" when creating ODS HTML</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/quot-File-is-in-use-quot-when-creating-ODS-HTML/m-p/31577#M4711</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Reeza nailed it.&amp;nbsp; SAS checks for the file being open, not they type of openness.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Jan 2012 03:13:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/quot-File-is-in-use-quot-when-creating-ODS-HTML/m-p/31577#M4711</guid>
      <dc:creator>Doc_Duke</dc:creator>
      <dc:date>2012-01-18T03:13:05Z</dc:date>
    </item>
    <item>
      <title>"File is in use" when creating ODS HTML</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/quot-File-is-in-use-quot-when-creating-ODS-HTML/m-p/31578#M4712</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Not so -- I update the file while it is being read through multiple browsers. Some applications (e.g., MS/Word) will put an exclusive hold on the file -- if they are permitted. For that reason, I make the directory read-only for my users. If they try to open it with MS/Word, it opens read-only.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Jan 2012 03:47:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/quot-File-is-in-use-quot-when-creating-ODS-HTML/m-p/31578#M4712</guid>
      <dc:creator>GTickner</dc:creator>
      <dc:date>2012-01-18T03:47:42Z</dc:date>
    </item>
  </channel>
</rss>

