Computing.Net > Forums > OpenVMS > File Access/Lock Checking

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

File Access/Lock Checking

Reply to Message Icon

Name: MeatPopsicle
Date: June 7, 2004 at 12:07:20 Pacific
OS: VMS 7.1-2
CPU/Ram: ???
Comment:

Does anyone have any clever scripts that will take a filename as an argument and return the process ID(s) or username(s) of anyone accessing or locking that file? Can such a beast be done? I've looked into DECamds, but cannot see a way to build a command line procedure to find this information. Thanks!

Phear the Meat



Sponsored Link
Ads by Google

Response Number 1
Name: VMSFan
Date: June 7, 2004 at 15:13:49 Pacific
Reply:

Use ANALYZE; dump desired results to a text file and search it. Example:

$ IF ( P1 .EQS. "" ) THEN P1 = ";" ! show all files by default
$ ANALYZE /SYSTEM
SET OUTPUT ANA_SYS.TMP
SHOW PROCESS ALL /CHANNEL
EXIT
$ SEARCH ANA_SYS.TMP /OUTPUT=FILE_LIST.TXT "Extended PID"+'P1'
$ DELETE ANA_SYS.TMP;
$ TYPE FILE_LIST.TXT


0

Response Number 2
Name: WillemGrooters
Date: June 9, 2004 at 06:29:15 Pacific
Reply:

Access can be done easier and without privileges (that you need to use ANALYZE/SYSTEM)

You'll get all the info you need by:

SHOW DEVICE/FILES/OUTPUT= FILE_LIST.TXT

To see who locks the file, you'll need ANALYZE/SYSTEM the way described before. But mostly, access list is enough.

Willem Grooters


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to OpenVMS Forum Home


Sponsored links

Ads by Google


Results for: File Access/Lock Checking

Accesing a locked file... www.computing.net/answers/openvms/accesing-a-locked-file/153.html

errorhandling in VMS files www.computing.net/answers/openvms/errorhandling-in-vms-files/298.html

VMS Lockmanager www.computing.net/answers/openvms/vms-lockmanager/10.html