<?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 Checking  using an external file in use in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Checking-using-an-external-file-in-use/m-p/276131#M55305</link>
    <description>&lt;P&gt;Hello Experts,&lt;/P&gt;
&lt;P&gt;In action 1 : I&amp;nbsp; zip a file&amp;nbsp; toto in&amp;nbsp; toto.zip&lt;/P&gt;
&lt;P&gt;In action 2: I&amp;nbsp; unzip a file&amp;nbsp; toto.zip&amp;nbsp; in&amp;nbsp; test&lt;/P&gt;
&lt;P&gt;Before doing the action 2, I would to check if the file toto.zip is not in use.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 08 Jun 2016 22:22:48 GMT</pubDate>
    <dc:creator>LineMoon</dc:creator>
    <dc:date>2016-06-08T22:22:48Z</dc:date>
    <item>
      <title>Checking  using an external file in use</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Checking-using-an-external-file-in-use/m-p/276131#M55305</link>
      <description>&lt;P&gt;Hello Experts,&lt;/P&gt;
&lt;P&gt;In action 1 : I&amp;nbsp; zip a file&amp;nbsp; toto in&amp;nbsp; toto.zip&lt;/P&gt;
&lt;P&gt;In action 2: I&amp;nbsp; unzip a file&amp;nbsp; toto.zip&amp;nbsp; in&amp;nbsp; test&lt;/P&gt;
&lt;P&gt;Before doing the action 2, I would to check if the file toto.zip is not in use.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 08 Jun 2016 22:22:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Checking-using-an-external-file-in-use/m-p/276131#M55305</guid>
      <dc:creator>LineMoon</dc:creator>
      <dc:date>2016-06-08T22:22:48Z</dc:date>
    </item>
    <item>
      <title>Re: Checking  using an external file in use</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Checking-using-an-external-file-in-use/m-p/276153#M55313</link>
      <description>&lt;P&gt;The easiest way to do this is to try and rename the file. If the rename action works, then the file is not locked.&lt;/P&gt;
&lt;P&gt;Another way is try and FOPEN() or MOPEN() the file.&lt;/P&gt;</description>
      <pubDate>Thu, 09 Jun 2016 05:00:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Checking-using-an-external-file-in-use/m-p/276153#M55313</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2016-06-09T05:00:39Z</dc:date>
    </item>
    <item>
      <title>Re: Checking  using an external file in use</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Checking-using-an-external-file-in-use/m-p/276158#M55314</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/16961"&gt;@ChrisNZ&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;The easiest way to do this is to try and rename the file. If the rename action works, then the file is not locked.&lt;/P&gt;
&lt;P&gt;Another way is try and FOPEN() or MOPEN() the file.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Won't work on UNIX. Since in UNIX, file metadata (location on disk, permissions, timestamps) is stored in the inode, and the filename(s) in the directories, a rename can be done while a file is in use. One can even remove (unlink) a file that is in use, something I use to avoid "file is locked by another user" issues.&lt;/P&gt;
&lt;P&gt;In UNIX, one should use the &lt;FONT face="courier new,courier"&gt;fuser&lt;/FONT&gt; commandline tool to determine if processes have a file handle on the file (inode) in question.&lt;/P&gt;</description>
      <pubDate>Thu, 09 Jun 2016 05:52:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Checking-using-an-external-file-in-use/m-p/276158#M55314</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2016-06-09T05:52:10Z</dc:date>
    </item>
    <item>
      <title>Re: Checking  using an external file in use</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Checking-using-an-external-file-in-use/m-p/276162#M55315</link>
      <description>&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/11562"&gt;@Kurt_Bremser&lt;/a&gt; I assume we have a windows user here, but you are right, Unix is different. The functions should work on unix too though, shouldn't they?</description>
      <pubDate>Thu, 09 Jun 2016 06:25:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Checking-using-an-external-file-in-use/m-p/276162#M55315</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2016-06-09T06:25:13Z</dc:date>
    </item>
    <item>
      <title>Re: Checking  using an external file in use</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Checking-using-an-external-file-in-use/m-p/276166#M55317</link>
      <description>&lt;P&gt;The functions will work on UNIX, but you would need to specify at least APPEND mode for FOPEN/MOPEN to force an error if the file is opened by another process.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 09 Jun 2016 07:18:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Checking-using-an-external-file-in-use/m-p/276166#M55317</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2016-06-09T07:18:43Z</dc:date>
    </item>
  </channel>
</rss>

