- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - OpenVMS
- >
- Call to F$FILE_ATTRIBUTES fails with "%SYSTEM-W-AC...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-28-2006 08:05 PM
02-28-2006 08:05 PM
Call to F$FILE_ATTRIBUTES fails with "%SYSTEM-W-ACCONFLICT, file access conflict"
Hi,
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.
However, the call to F$FILE_ATTRIBUTES fails because the file is in unshared write access and I see:
SET-E-READERR, error reading TCPIP$TFTP_ROOT:[000000]RUNNING_CONFIG.TXT;2
-SYSTEM-W-ACCONFLICT, file access conflict %SYSTEM-W-ACCONFLICT, file access conflict \TCPIP$TFTP_ROOT:[000000]RUNNING_CONFIG.TXT\
%DCL-E-INVIFNEST, invalid IF-THEN-ELSE nesting structure or data inconsistency
The IF-THEN-ELSE construction that I am using is:
$ IF F$FILE_ATTRIBUTES ("TCPIP$TFTP_ROOT:[000000.''P1']RUNNING-CONFIG.TXT", "EOF") .EQ. 0
$ THEN
$ CALL SIGNAL_EVENT "EMPTY" "E" "File TCPIP$TFTP_ROOT:[000000.''P1']RUNNING-C
ONFIG.TXT is empty"
$ DELETE TCPIP$TFTP_ROOT:[000000.'P1']RUNNING-CONFIG.TXT;
$ ENDIF
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".
Isn't an lexical function designed to return "" if a warning occurs and not abort, thereby destroying the IF-THEN-ELSE construct?
Is the following construction the only solution to this bug/feature?
$ FILE_SIZE = F$FILE_ATTRIBUTES ("TCPIP$TFTP_ROOT:[000000.''P1']RUNNING-CONFIG.T
XT", "EOF")
$ IF (F$TYPE (FILE_SIZE) .EQS. "INTEGER") .AND. (FILE_SIZE .EQ. 0)
$ THEN
$ CALL SIGNAL_EVENT "EMPTY" "E" "File TCPIP$TFTP_ROOT:[000000.''P1']RUNNING-C
ONFIG.TXT is empty"
$ DELETE TCPIP$TFTP_ROOT:[000000.'P1']RUNNING-CONFIG.TXT;
$ ENDIF
Regards,
Dave Laurier
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-28-2006 09:32 PM
02-28-2006 09:32 PM
Re: Call to F$FILE_ATTRIBUTES fails with "%SYSTEM-W-ACCONFLICT, file access conflict"
regards Kalle
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-28-2006 09:44 PM
02-28-2006 09:44 PM
Re: Call to F$FILE_ATTRIBUTES fails with "%SYSTEM-W-ACCONFLICT, file access conflict"
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:
Item: LOCKED
Returns: String
Value: TRUE if a file is deaccessed-locked; otherwise FALSE.
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-28-2006 09:50 PM
02-28-2006 09:50 PM
Re: Call to F$FILE_ATTRIBUTES fails with "%SYSTEM-W-ACCONFLICT, file access conflict"
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-28-2006 10:11 PM
02-28-2006 10:11 PM
Re: Call to F$FILE_ATTRIBUTES fails with "%SYSTEM-W-ACCONFLICT, file access conflict"
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=602985
Wim
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-28-2006 10:43 PM
02-28-2006 10:43 PM
Re: Call to F$FILE_ATTRIBUTES fails with "%SYSTEM-W-ACCONFLICT, file access conflict"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-01-2006 08:40 AM
03-01-2006 08:40 AM
Re: Call to F$FILE_ATTRIBUTES fails with "%SYSTEM-W-ACCONFLICT, file access conflict"
>I think it is really strange that I
>can not use the F$FILE_ATTRIBUTES here
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.
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.
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!).
This is probably worth an enhancement request to http://www.hpuseradvocacy.org/
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-16-2006 07:18 PM
03-16-2006 07:18 PM
Re: Call to F$FILE_ATTRIBUTES fails with "%SYSTEM-W-ACCONFLICT, file access conflict"
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.