- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - OpenVMS
- >
- How can I read locked files?
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
Discussions
Discussions
Forums
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
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
тАО10-31-2005 01:10 AM
тАО10-31-2005 01:10 AM
I am trying to read a text file that is locked by another application. Is there any special API or flag that I can use in order to be able to read this file?? something that can ignore the locking mechanism??
I tied to use SYS$OPEN but It does not work!!
Can you help me?
Thanks,
Sami.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-31-2005 02:00 AM
тАО10-31-2005 02:00 AM
Re: How can I read locked files?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-31-2005 02:13 AM
тАО10-31-2005 02:13 AM
Re: How can I read locked files?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-31-2005 02:15 AM
тАО10-31-2005 02:15 AM
Re: How can I read locked files?
Specifically, indexed files can have the key(s) info in other parts of the file as the data, and there is a serious chance of having data and key(s) out of sync. (one before, the other after the write-to-disk.
Then again, if this only is for a glimp of the progress, it is a perfectly good method.
Proost.
Have one on me.
jpe
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-31-2005 02:18 AM
тАО10-31-2005 02:18 AM
SolutionThat is: indicate read access only, allowing writers.
If the application tolerates reader, but no writers, then that is the appropriate open.
Try CONVERT/SHARE
If that still does not work, then as Dale says, try BACKU/IGNORE=INTERLOCK.
This uses QIO ACCESS to open the file with FIB$V_NOLOCK. (IO Users Ref manaual. ACP-QIO Table 1-3 FIB Fields)
However, since the application apparently was not interested in sharing, significant chunks of the data (all!) might not have been flushed out to disk, and most likely the EOF pointer has not been updated.
The default RMS buffer size (assuming the application is using RMS!) has been bumped from 16 blocks to 32 blocks. So unless teh application actually asked for action (SYS$FLUSH), the last 16KB of data will likely only exists in process private memory (ANAl/SYSTEM... SHOW PROC/RMS=(RAB,BDBSUM) to confirm).
hth,
Hein.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-31-2005 03:07 AM
тАО10-31-2005 03:07 AM
Re: How can I read locked files?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-31-2005 03:30 AM
тАО10-31-2005 03:30 AM
Re: How can I read locked files?
You made a more mEstakes in that line...
>>> I tied to use SYS$OPEN but It does not work!!
tie-ing open probably restricts its effectivness
and, let me assure you that SYS$OPEN works.
If It did not, then all hell would break loose, wouldn't it?
Not It might not have done what you wanted, but it did faithfully do what you asked.
Just kidding,
Hein.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-31-2005 03:46 AM
тАО10-31-2005 03:46 AM
Re: How can I read locked files?
Wim
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-31-2005 09:40 PM
тАО10-31-2005 09:40 PM
Re: How can I read locked files?
Using BACKUP/IGNORE=INTERLOCK is not an option for me (performance issues). I'll try to use FAC=GET, SHR=UPD hoping it will help, but if I understand correctly, if the application locking the file does not tolerate readers then there is no way to read the file and "ignore" the locking right??!!
Sami.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-31-2005 11:43 PM
тАО10-31-2005 11:43 PM
Re: How can I read locked files?
Wizards could possibly use privved code to queue an AST to the user process telling it to flush if they can figure out the rab (make one up with a generate RAB$W_ISI).
It is hard to imagine why backup/ignore would pose a performance issaue. We are not talking about going to tape or a saveset. Just using backup as an alternative to copy. IF backup/ignore=interlock works for you, but you have reasons to reject it, then you can write a modest tool to use QIO to open the file with FIB$V_NOLOCK as I mentioned. The VMS freeware probably has examples to get you going (there are QIO access examples in my RMS_TOOLS freeware contribution).
Good luck!
Hein.