[mod.computers.vax] Quick question--how to set file protection from program in VMS

levy@ttrdc.UUCP.UUCP (06/09/86)

I have a quick question which I hope someone "out there" can either tell
me how to do under VMS 4.2 or can tell me exactly what manual to look in.
That is, I would like to set the protection of a file from a program in
VMS, specifically a Fortran program which creates the file.  (This is
easy enough in C since the protection is specified when the file is
created, but Fortran doesn't make it easy.)  Now the help library on
RTL and SYSTEM gives information which is helpful in finding out the
protection on a file that is already there, but I can't seem to find
anything which tells me how to do the opposite, that is, to set the
protection on an existing file.  (I am just interested in read/write/execute/
delete protections, not ACLs or anything fancy.)  Thank you very much...

 -------------------------------    Disclaimer:  The views contained herein are
|       dan levy | yvel nad      |  my own and are not at all those of my em-
|         an engihacker @        |  ployer or the administrator of any computer
| at&t computer systems division |  upon which I may hack.
|        skokie, illinois        |
 --------------------------------   Path: ..!{akgua,homxb,ihnp4,ltuxa,mvuxa,
						vax135}!ttrdc!levy

gwalker@BBN-SPCA.ARPA.UUCP (06/09/86)

Check the RMS manuals, for the XABPRO block. I'm not familiar enough with
Fortran - but you must be able to open the file for writing with a XABPRO
attached to the FAB. (This may mean you need to use the USEROPEN feature
of Fortran). Then set the protection you want into the XABPRO and close the
file. I've done this from C - we don't use the existing libraries so we
have our own change protection routine - and that is the method it uses.

-- Gail Rubin Walker
gwalker@bbn-spca