<?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: Call to F$FILE_ATTRIBUTES fails with &amp;quot;%SYSTEM-W-ACCONFLICT, file access conflict&amp;quot; in Operating System - OpenVMS</title>
    <link>https://community.hpe.com/t5/operating-system-openvms/call-to-f-file-attributes-fails-with-quot-system-w-acconflict/m-p/4963539#M33863</link>
    <description>&lt;BR /&gt;Due to the behavior of F$FILE_ATTRIBUTES in case of an access conflict I have used the second mechanism as described in my original post (first put the result from F$FILE_ATTRIBUTES in a variable and then interpret that variable). This way the IF-THEN-ELSE construct is not destroyed when F$FILE_ATTRIBUTES aborts due to an access conflict.</description>
    <pubDate>Fri, 17 Mar 2006 03:18:57 GMT</pubDate>
    <dc:creator>Dave Laurier</dc:creator>
    <dc:date>2006-03-17T03:18:57Z</dc:date>
    <item>
      <title>Call to F$FILE_ATTRIBUTES fails with "%SYSTEM-W-ACCONFLICT, file access conflict"</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/call-to-f-file-attributes-fails-with-quot-system-w-acconflict/m-p/4963532#M33856</link>
      <description>&lt;BR /&gt;Hi,&lt;BR /&gt;&lt;BR /&gt;I have written a DCL command file that logs into a Cisco and then copies the configuration towards a TFTP server on OpenVMS. Afterwards I try to verify whether the file transfer succeeded by using the F$FILE_ATTRIBUTES lexical and check for the file size.&lt;BR /&gt;&lt;BR /&gt;However, the call to F$FILE_ATTRIBUTES fails because the file is in unshared write access and I see:&lt;BR /&gt;&lt;BR /&gt;SET-E-READERR, error reading TCPIP$TFTP_ROOT:[000000]RUNNING_CONFIG.TXT;2&lt;BR /&gt;-SYSTEM-W-ACCONFLICT, file access conflict %SYSTEM-W-ACCONFLICT, file access conflict  \TCPIP$TFTP_ROOT:[000000]RUNNING_CONFIG.TXT\&lt;BR /&gt;%DCL-E-INVIFNEST, invalid IF-THEN-ELSE nesting structure or data inconsistency&lt;BR /&gt;&lt;BR /&gt;The IF-THEN-ELSE construction that I am using is:&lt;BR /&gt;&lt;BR /&gt;$ IF F$FILE_ATTRIBUTES ("TCPIP$TFTP_ROOT:[000000.''P1']RUNNING-CONFIG.TXT", "EOF") .EQ. 0&lt;BR /&gt;$ THEN&lt;BR /&gt;$    CALL SIGNAL_EVENT "EMPTY" "E" "File TCPIP$TFTP_ROOT:[000000.''P1']RUNNING-C&lt;BR /&gt;ONFIG.TXT is empty"&lt;BR /&gt;$    DELETE TCPIP$TFTP_ROOT:[000000.'P1']RUNNING-CONFIG.TXT;&lt;BR /&gt;$ ENDIF&lt;BR /&gt;&lt;BR /&gt;Why does the lexical function not return the documented result? According to the OpenVMS DCL dictionary I should receive an integer when using the data type "EOF".&lt;BR /&gt;&lt;BR /&gt;Isn't an lexical function designed to return "" if a warning occurs and not abort, thereby destroying the IF-THEN-ELSE construct?&lt;BR /&gt;&lt;BR /&gt;Is the following construction the only solution to this bug/feature?&lt;BR /&gt;&lt;BR /&gt;$ FILE_SIZE = F$FILE_ATTRIBUTES ("TCPIP$TFTP_ROOT:[000000.''P1']RUNNING-CONFIG.T&lt;BR /&gt;XT", "EOF")&lt;BR /&gt;$ IF (F$TYPE (FILE_SIZE) .EQS. "INTEGER") .AND. (FILE_SIZE .EQ. 0)&lt;BR /&gt;$ THEN&lt;BR /&gt;$    CALL SIGNAL_EVENT "EMPTY" "E" "File TCPIP$TFTP_ROOT:[000000.''P1']RUNNING-C&lt;BR /&gt;ONFIG.TXT is empty"&lt;BR /&gt;$    DELETE TCPIP$TFTP_ROOT:[000000.'P1']RUNNING-CONFIG.TXT;&lt;BR /&gt;$ ENDIF&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;&lt;BR /&gt;Dave Laurier&lt;BR /&gt;</description>
      <pubDate>Wed, 01 Mar 2006 04:05:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/call-to-f-file-attributes-fails-with-quot-system-w-acconflict/m-p/4963532#M33856</guid>
      <dc:creator>Dave Laurier</dc:creator>
      <dc:date>2006-03-01T04:05:43Z</dc:date>
    </item>
    <item>
      <title>Re: Call to F$FILE_ATTRIBUTES fails with "%SYSTEM-W-ACCONFLICT, file access conflict"</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/call-to-f-file-attributes-fails-with-quot-system-w-acconflict/m-p/4963533#M33857</link>
      <description>It seems as if the file is still opened by the FTP server, perhaps you can insert a little wait. The usual approach to check for 'locked' is to try to open the file using /ERROR label.&lt;BR /&gt;&lt;BR /&gt;regards Kalle</description>
      <pubDate>Wed, 01 Mar 2006 05:32:02 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/call-to-f-file-attributes-fails-with-quot-system-w-acconflict/m-p/4963533#M33857</guid>
      <dc:creator>Karl Rohwedder</dc:creator>
      <dc:date>2006-03-01T05:32:02Z</dc:date>
    </item>
    <item>
      <title>Re: Call to F$FILE_ATTRIBUTES fails with "%SYSTEM-W-ACCONFLICT, file access conflict"</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/call-to-f-file-attributes-fails-with-quot-system-w-acconflict/m-p/4963534#M33858</link>
      <description>Thanks for your suggestion to try to open the file and use the /ERROR construct. I consider this to be a proper work-around.&lt;BR /&gt;&lt;BR /&gt;I think it is really strange that I can not use the F$FILE_ATTRIBUTES here, it even contains an item that suggests to test what I would like to know:&lt;BR /&gt;&lt;BR /&gt;Item: LOCKED    &lt;BR /&gt;Returns: String    &lt;BR /&gt;Value: TRUE if a file is deaccessed-locked; otherwise FALSE.&lt;BR /&gt;&lt;BR /&gt;When I use such a construction that first checks whether the file is locked (with F$FILE_ATTRIBUTES (... "LOCKED") then I see the same error occuring.&lt;BR /&gt;</description>
      <pubDate>Wed, 01 Mar 2006 05:44:57 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/call-to-f-file-attributes-fails-with-quot-system-w-acconflict/m-p/4963534#M33858</guid>
      <dc:creator>Dave Laurier</dc:creator>
      <dc:date>2006-03-01T05:44:57Z</dc:date>
    </item>
    <item>
      <title>Re: Call to F$FILE_ATTRIBUTES fails with "%SYSTEM-W-ACCONFLICT, file access conflict"</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/call-to-f-file-attributes-fails-with-quot-system-w-acconflict/m-p/4963535#M33859</link>
      <description>&amp;gt; deaccessed-locked;&lt;BR /&gt;&lt;BR /&gt;That is not the same as a file that is locked due to being open by another process. Deaccess-lock is a legacy from the RSX operating system. It means that the file was not properly closed by an application before, e.g. due to a system crash. As far as I can tell, it not used in these days.</description>
      <pubDate>Wed, 01 Mar 2006 05:50:58 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/call-to-f-file-attributes-fails-with-quot-system-w-acconflict/m-p/4963535#M33859</guid>
      <dc:creator>Uwe Zessin</dc:creator>
      <dc:date>2006-03-01T05:50:58Z</dc:date>
    </item>
    <item>
      <title>Re: Call to F$FILE_ATTRIBUTES fails with "%SYSTEM-W-ACCONFLICT, file access conflict"</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/call-to-f-file-attributes-fails-with-quot-system-w-acconflict/m-p/4963536#M33860</link>
      <description>Also check this one.&lt;BR /&gt;&lt;A href="http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=602985" target="_blank"&gt;http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=602985&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Wim</description>
      <pubDate>Wed, 01 Mar 2006 06:11:02 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/call-to-f-file-attributes-fails-with-quot-system-w-acconflict/m-p/4963536#M33860</guid>
      <dc:creator>Wim Van den Wyngaert</dc:creator>
      <dc:date>2006-03-01T06:11:02Z</dc:date>
    </item>
    <item>
      <title>Re: Call to F$FILE_ATTRIBUTES fails with "%SYSTEM-W-ACCONFLICT, file access conflict"</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/call-to-f-file-attributes-fails-with-quot-system-w-acconflict/m-p/4963537#M33861</link>
      <description>Also check this threat&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=992684" target="_blank"&gt;http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=992684&lt;/A&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 01 Mar 2006 06:43:17 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/call-to-f-file-attributes-fails-with-quot-system-w-acconflict/m-p/4963537#M33861</guid>
      <dc:creator>Daniel Fernandez Illan</dc:creator>
      <dc:date>2006-03-01T06:43:17Z</dc:date>
    </item>
    <item>
      <title>Re: Call to F$FILE_ATTRIBUTES fails with "%SYSTEM-W-ACCONFLICT, file access conflict"</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/call-to-f-file-attributes-fails-with-quot-system-w-acconflict/m-p/4963538#M33862</link>
      <description>Dave,&lt;BR /&gt;&lt;BR /&gt;&amp;gt;I think it is really strange that I &lt;BR /&gt;&amp;gt;can not use the F$FILE_ATTRIBUTES here&lt;BR /&gt;&lt;BR /&gt;  F$FILE must open the file to access information in the header. It's subject to the same access rules as other processes. It will attempt to open the file for shared read access. If other processes that have the file open grant that access, then F$FILE will succeed.&lt;BR /&gt;&lt;BR /&gt;  However, if another processes has the file open for exclusive access, F$FILE will (correctly) fail with ACCONFLICT. If that happens, the return value is undefined, which means the IF statement is undefined, so the THEN/ENDIF becomes invalid.&lt;BR /&gt;&lt;BR /&gt;  I suppose F$FILE could have been defined to return "" (or maybe "ACCONFLICT"?) in this case, or there could be an item to explicitly ask "is this file locked" (subject to all the usual timing window issues of such things). Unfortunately for you it's not defined that way. As others have pointed out, "deaccess locked" means something completely different (and completely useless!).&lt;BR /&gt;&lt;BR /&gt;  This is probably worth an enhancement request to &lt;A href="http://www.hpuseradvocacy.org/" target="_blank"&gt;http://www.hpuseradvocacy.org/&lt;/A&gt;</description>
      <pubDate>Wed, 01 Mar 2006 16:40:56 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/call-to-f-file-attributes-fails-with-quot-system-w-acconflict/m-p/4963538#M33862</guid>
      <dc:creator>John Gillings</dc:creator>
      <dc:date>2006-03-01T16:40:56Z</dc:date>
    </item>
    <item>
      <title>Re: Call to F$FILE_ATTRIBUTES fails with "%SYSTEM-W-ACCONFLICT, file access conflict"</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/call-to-f-file-attributes-fails-with-quot-system-w-acconflict/m-p/4963539#M33863</link>
      <description>&lt;BR /&gt;Due to the behavior of F$FILE_ATTRIBUTES in case of an access conflict I have used the second mechanism as described in my original post (first put the result from F$FILE_ATTRIBUTES in a variable and then interpret that variable). This way the IF-THEN-ELSE construct is not destroyed when F$FILE_ATTRIBUTES aborts due to an access conflict.</description>
      <pubDate>Fri, 17 Mar 2006 03:18:57 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/call-to-f-file-attributes-fails-with-quot-system-w-acconflict/m-p/4963539#M33863</guid>
      <dc:creator>Dave Laurier</dc:creator>
      <dc:date>2006-03-17T03:18:57Z</dc:date>
    </item>
  </channel>
</rss>

