<?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 How program can find out that a file can be copied? in Operating System - OpenVMS</title>
    <link>https://community.hpe.com/t5/operating-system-openvms/how-program-can-find-out-that-a-file-can-be-copied/m-p/4933633#M32872</link>
    <description>I need to copy a file with LIB$SPAUN('copy… . What system service can I use to determine that file to be copied is not allocated by other program (e.g. that file transfer from different machine has finished). From DCL I can use SHOW DEV /FIL to check it, but I have no idea how to do that from FORTRAN or C level.</description>
    <pubDate>Fri, 14 Oct 2005 04:37:51 GMT</pubDate>
    <dc:creator>Jurek Sokolowski</dc:creator>
    <dc:date>2005-10-14T04:37:51Z</dc:date>
    <item>
      <title>How program can find out that a file can be copied?</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/how-program-can-find-out-that-a-file-can-be-copied/m-p/4933633#M32872</link>
      <description>I need to copy a file with LIB$SPAUN('copy… . What system service can I use to determine that file to be copied is not allocated by other program (e.g. that file transfer from different machine has finished). From DCL I can use SHOW DEV /FIL to check it, but I have no idea how to do that from FORTRAN or C level.</description>
      <pubDate>Fri, 14 Oct 2005 04:37:51 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/how-program-can-find-out-that-a-file-can-be-copied/m-p/4933633#M32872</guid>
      <dc:creator>Jurek Sokolowski</dc:creator>
      <dc:date>2005-10-14T04:37:51Z</dc:date>
    </item>
    <item>
      <title>Re: How program can find out that a file can be copied?</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/how-program-can-find-out-that-a-file-can-be-copied/m-p/4933634#M32873</link>
      <description>Jurek,&lt;BR /&gt;&lt;BR /&gt;there is no system service to tell, whether a file is opened from another process.&lt;BR /&gt;&lt;BR /&gt;You could try to open the file in exclusive mode, allowing no sharing, which would fail, if another process has the file open.&lt;BR /&gt;&lt;BR /&gt;Volker.</description>
      <pubDate>Fri, 14 Oct 2005 04:43:44 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/how-program-can-find-out-that-a-file-can-be-copied/m-p/4933634#M32873</guid>
      <dc:creator>Volker Halle</dc:creator>
      <dc:date>2005-10-14T04:43:44Z</dc:date>
    </item>
    <item>
      <title>Re: How program can find out that a file can be copied?</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/how-program-can-find-out-that-a-file-can-be-copied/m-p/4933635#M32874</link>
      <description>Jurek,&lt;BR /&gt;&lt;BR /&gt;You might want to try SYS$OPEN.&lt;BR /&gt;See HELP SYSTEM_SERVICES $OPEN , and the Record Management Services Reference manual.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Kris (aka Qkcl)&lt;BR /&gt;</description>
      <pubDate>Fri, 14 Oct 2005 04:45:19 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/how-program-can-find-out-that-a-file-can-be-copied/m-p/4933635#M32874</guid>
      <dc:creator>Kris Clippeleyr</dc:creator>
      <dc:date>2005-10-14T04:45:19Z</dc:date>
    </item>
    <item>
      <title>Re: How program can find out that a file can be copied?</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/how-program-can-find-out-that-a-file-can-be-copied/m-p/4933636#M32875</link>
      <description>Have a look into the utility FILES_INFO.&lt;BR /&gt;It can display, if a file is locked and by whom.&lt;BR /&gt;Source code (C and macro) is provided.&lt;BR /&gt;May you can get some hints.&lt;BR /&gt;&lt;BR /&gt;You find it at the usual place at Hunter Goatley filearchive:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://www.process.com/openvms/index.html" target="_blank"&gt;http://www.process.com/openvms/index.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;regards Kalle</description>
      <pubDate>Fri, 14 Oct 2005 05:15:56 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/how-program-can-find-out-that-a-file-can-be-copied/m-p/4933636#M32875</guid>
      <dc:creator>Karl Rohwedder</dc:creator>
      <dc:date>2005-10-14T05:15:56Z</dc:date>
    </item>
    <item>
      <title>Re: How program can find out that a file can be copied?</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/how-program-can-find-out-that-a-file-can-be-copied/m-p/4933637#M32876</link>
      <description>Jurek,&lt;BR /&gt;&lt;BR /&gt;the following statement in FORTRAN could do, what you want:&lt;BR /&gt;&lt;BR /&gt;OPEN (UNIT=1, FILE='test.dat',STATUS='OLD')&lt;BR /&gt;&lt;BR /&gt;$! File test.dat not access by any process&lt;BR /&gt;$ run ITRC_965548&lt;BR /&gt;&lt;BR /&gt;$! Access file&lt;BR /&gt;$ open/read x test.dat&lt;BR /&gt;$ run ITRC_965548&lt;BR /&gt;%FOR-F-OPEFAI, open failure&lt;BR /&gt;  unit 1  file USERDISK1:&lt;HALLE.ITRC&gt;TEST.DAT;&lt;BR /&gt;  user PC 00000000&lt;BR /&gt;-RMS-E-FLK, file currently locked by another user&lt;BR /&gt;...&lt;BR /&gt;&lt;BR /&gt;Volker.&lt;/HALLE.ITRC&gt;</description>
      <pubDate>Fri, 14 Oct 2005 05:24:21 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/how-program-can-find-out-that-a-file-can-be-copied/m-p/4933637#M32876</guid>
      <dc:creator>Volker Halle</dc:creator>
      <dc:date>2005-10-14T05:24:21Z</dc:date>
    </item>
    <item>
      <title>Re: How program can find out that a file can be copied?</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/how-program-can-find-out-that-a-file-can-be-copied/m-p/4933638#M32877</link>
      <description>Opening a file as a test is simple and works fine. Thank you very much for your help. &lt;BR /&gt;Jurek</description>
      <pubDate>Fri, 14 Oct 2005 05:40:07 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/how-program-can-find-out-that-a-file-can-be-copied/m-p/4933638#M32877</guid>
      <dc:creator>Jurek Sokolowski</dc:creator>
      <dc:date>2005-10-14T05:40:07Z</dc:date>
    </item>
    <item>
      <title>Re: How program can find out that a file can be copied?</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/how-program-can-find-out-that-a-file-can-be-copied/m-p/4933639#M32878</link>
      <description>The best approach is to simply attempt to copy the file and react to any errors. Any test is subject to timing windows. Yes, the file may be available NOW, but that doesn't say it will still be available when you attempt the copy.&lt;BR /&gt;&lt;BR /&gt;The simplest way to copy a file under program control is using callable CONVERT.&lt;BR /&gt;&lt;BR /&gt;Attached is a MACRO32 program to perform a COPY. Check the return status to see if it was successful.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Sun, 16 Oct 2005 17:43:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/how-program-can-find-out-that-a-file-can-be-copied/m-p/4933639#M32878</guid>
      <dc:creator>John Gillings</dc:creator>
      <dc:date>2005-10-16T17:43:46Z</dc:date>
    </item>
  </channel>
</rss>

