(go to: table of contents, index, list of vms_sys, prev: SETDDIR, next: SETEF)
Please note that Python uses the C RTL for file I/O. Usage of the umask()
function can render this setup useless.
Format:
SETDFPROT - Set Default File Protection
Allows you to read and write the default file protection for the
process.
01-JAN-1999 ZE.
cur-def-prot = vms_sys.setdfprot ([new-def-prot])
Returns:
Arguments:
Examples:
$ SHOW PROTECTION
SYSTEM=RWED, OWNER=RWED, GROUP=RE, WORLD=NO ACCESS
$
$ PYTHON
[ banner omitted ]
>>> import vms_sys
>>> old_prot = vms_sys.setdfprot ()
>>> print old_prot
64000
>>>
>>> old_prot = vms_sys.setdfprot (None)
>>> print old_prot
64000
>>> hex (old_prot)
'0xfa00'
>>>
>>> old_prot = vms_sys.setdfprot (0x1234)
>>> hex (old_prot)
'0xfa00'
>>> new_prot = vms_sys.setdfprot (None)
>>> hex (new_prot)
'0x1234'
>>>
>>> import vms_lib
>>> vms_lib.do_command ('SHOW PROTECTION')
SYSTEM=RWD, OWNER=ED, GROUP=RED, WORLD=WED
$
>>> vms_sys.setdfprot ('X')
Traceback (innermost last):
File "<stdin>", line 1, in ?
TypeError: argument 1: new-def-prot - must be positive\
16-bit integer or None
>>>
(go to: table of contents,
index,
list of vms_sys,
prev: SETDDIR,
next: SETEF)