Article 140148 of comp.os.vms:
Path: nntpd.lkg.dec.com!lead.zk3.dec.com!crl.dec.com!pa.dec.com!decuac.dec.com!haven.umd.edu!purdue!lerc.nasa.gov!magnus.acs.ohio-state.edu!math.ohio-state.edu!howland.reston.ans.net!newsfeed.internetmci.com!in2.uu.net!explorer.csc.com!explorer.csc.com!not-for-mail
From: rkoehler@csc.com (Robert Koehler)
Newsgroups: comp.os.vms
Subject: Re: RMS LOcks Manager
Date: 12 Feb 1996 09:30:38 -0500
Organization: Computer Sciences Corporation
Lines: 30
Message-ID: <4fniue$61o@explorer.csc.com>
References: <4fgfp2$kol@news.zocalo.net>
NNTP-Posting-Host: explorer.csc.com
X-Newsreader: TIN [version 1.2 PL2]

Arden Scott (arden@nis.com) wrote:
: We are looking for a way to find the user name of the person who has a lock
: on a particular record or file which was locked via RMS SYS$GET(rab) call
: under VMS 5.4 on a VAX. I have not been able to find any documented method
: or even if the information is available. Any help greatly appreciated.
: arden@nis.com at National Information Systems. Thank you.

This is not docuemented in any of the standard manuals, and is subject to
without notice.

RMS uses an executive mode lock on the file, who's resource name is of the
format 'RMS$' followed by the three word file id (FID), followed by the 
volume name, trailing blank padded to fill the 12 character volume name.

The record locks are children of this locks, they have an eight byte resource
name which includes the 6 byte record file address (RFA) of the record.  The 
exact format depends on the record type.

It's usually good enought to call $GETLKI form executive mode until you find 
processes who have RMS locks on the file, don't bother digging down to the RFA
unless you have to.  You can get the FID from RMS calls, or for a quickie just
dir/file_id.

You could get a copy of The Hitchhiker's Guide to VMS, Bruce Ellis,
Professional Press Books, ISBN 1-878956-00-0 you if need sample code and you
need to get down to the RFA.

------------------------------------------------------------------------------
Bob Koehler                     | CSC/SSD/MITG
rkoehler@csc.com                |


