(go to: table of contents, index, list of vms_sys, prev: SETUAI, next: SET_SECURITY)
Format:
SET_RESOUCE_DOMAIN - Set Resource Domain
Controls the association between a calling process and resource domains.
status, rsdm_id = vms_sys.set_resource_domain (func, rsdm_id,
domain_number, [nullarg], [access], [acmode])
Returns:
Arguments:
Examples:
>>> import vms_sys
>>> import vms_rsdmdef
>>> status, rsdm_id = vms_sys.set_resource_domain ( \
... vms_rsdmdef.RSDM__JOIN_DOMAIN, \
... 0, 5, None, vms_rsdmdef.RSDM_M_LOCK)
>>> print (status, rsdm_id)
(1, 131074)
>>> print vms_sys.getmsg (status) [0]
%SYSTEM-S-NORMAL, normal successful completion
>>>
>>> import vms_lckdef
>>> l_lkmode = vms_lckdef.LCK_K_NLMODE
>>> # Note: LKSB will be created automatically -v
>>> dict = vms_sys.enqw (None, l_lkmode, None, None,
... 'PY_RESNAM', None, None,
... None, None, None, rsdm_id)
>>> for key in dict.keys():
... print key, '=', dict.get(key)
... #-for
...
lksb = <vmsobj_lksb, LKSB at 0x00285718>
status = 1 <-- from SYS$ENQW()
>>>
>>> # check status inside LKSB
>>> r_lksb = dict.get ('lksb')
>>> w_status = r_lksb.W_STATUS
>>> print vms_sys.getmsg (w_status) [0]
%SYSTEM-S-NORMAL, normal successful completion
>>>
>>> status, rsdm_xx = vms_sys.set_resource_domain ( \
... vms_rsdmdef.RSDM__LEAVE, \
... rsdm_id, 5, None, None)
>>> print (status, rsdm_xx)
(3834, 131074)
>>> print vms_sys.getmsg (status) [0]
%SYSTEM-E-RSDM_ACTIVE, resource domain active
>>>
(go to: table of contents,
index,
list of vms_sys,
prev: SETUAI,
next: SET_SECURITY)