| Hi,
> <cab lock exclulsive !oa$curdoc
> <newdir other_user
The lock will be lost. The function NEWDIR internally does a CAB CLOSE
function, which close the File Cabinet and releases all locks. You need
to reserve the document instead.
> <get #filename = "full path name"
> <get #status = file$status[#filename]
You have a missing dot. the line should be
<get #status = file$.status[#filename]
> <get #status ! result is "1"
FILE$ will not open the file just to return the status. To get file
locked you can:
get file$.%open[#filename]
get #acl = .acl
get #status = .status
get file$.%close[#filename]
Cheers
Stuart
|
|
RE .0 .2
Stuart is right, his example will get you what you want. Probably
<get file$.acl[#filename] .status
will work aswell.
As a matter of interest you don't have to use the acl field, you can use
any field that would force the dataset to open the file ie block_size or
one of the key information fields. Also cab lock uses the VMS lock manager
to provide a lock id that is it only locks the namespace and never puts an
RMS lock on the file.
Hope this helps
-Paul
|