(LOGO.JPG) Python for OpenVMS

(go to: table of contents, index, list of vms_sys, prev: MOD_HOLDER, next: MOUNT)


MOD_IDENT - Modify Identifier in Rights Database


Modifies the specified identifier record in the rights database.

Format:

    vms_sys.mod_ident (id [,set_attrib] [,clr_attrib] \
                       [,new_name] [,new_value])
Returns:

None

Arguments:

id
Binary value of identifier to be modified.
set_attrib
Bit mask of attributes to be enabled for the identifier. If you specify the same attribute in set_attrib and clr_attrib, the attribute is enabled. Bitmask values are defined in module 'vms_kgbdef'.
clr_attrib
Bit mask of attributes to be disabled for the identifier. If you specify the same attribute in set_attrib and clr_attrib, the attribute is enabled. Bitmask values are defined in module 'vms_kgbdef'.
new_name
New name to be given to the specified identifier. See the system services reference manual for the allowed characters.
new_value
New value to be assigned to the specified identifier. When the identifier value is changed, MOD_IDENT also changes the value of the identifier in all of the holder records in which the specified identifier appears.
Examples:
UAF> add /identifier ID_1 /attributes=resource
%UAF-I-RDBADDMSG, identifier ID_1 value %X80010011 added to rights \
 database
UAF> add /identifier ID_2 /attributes=(dynamic,resource)
%UAF-I-RDBADDMSG, identifier ID_2 value %X80010012 added to rights \
 database
UAF> show /identifier /full ID_1
  Name                             Value           Attributes
  ID_1                             %X80010011      RESOURCE
UAF> show /identifier /full ID_2
  Name                             Value           Attributes
  ID_2                             %X80010012      RESOURCE DYNAMIC
UAF>

>>> import vms_sys
>>> import vms_kgbdef

>>> id_1 = 0x80010011    # identifier ID_1
>>> id_2 = 0x80010012    # identifier ID_2
>>> at_dyn = vms_kgbdef.KGB_M_DYNAMIC

>>> vms_sys.mod_ident (id_1, at_dyn, vms_kgbdef.KGB_M_RESOURCE)
UAF> show /identifier /full ID_1
  Name                             Value           Attributes
  ID_1                             %X80010011      DYNAMIC
UAF> ! RESOURCE cleared, DYNAMIC set

>>> # try to change the identifier value of ID_1 to that of ID_2
>>> #   which already exists
>>> vms_sys.mod_ident (id_1, None, None, None, id_2)
Traceback (innermost last):
  File "<stdin>", line 1, in ?
vms_sys.error: (8748, '%SYSTEM-F-DUPIDENT, duplicate identifier')
>>>

>>> # try to change the identifier value of ID_1 to an unused value
>>> vms_sys.mod_ident (id_1, None, None, None, 0x80012345)
UAF> show /identifier /full ID_1
  Name                             Value           Attributes
  ID_1                             %X80012345      DYNAMIC
UAF>


>>> # ID_1 has a new value after above operation !
>>> id_1 = 0x80012345

>>> # try to rename identifier %X80012345 (named ID_1) to ID_2 which
>>> #   does already exist
>>> vms_sys.mod_ident (id_1, None, None, 'ID_2')
Traceback (innermost last):
  File "<stdin>", line 1, in ?
vms_sys.error: (148, '%SYSTEM-F-DUPLNAM, duplicate name')
>>>

>>> # rename identifier %X80012345 (named ID_1) to ID_1X which
>>> #   does not exist
>>> vms_sys.mod_ident (id_1, None, None, 'ID_1X')
UAF> show /identifier /full ID_1X
  Name                             Value           Attributes
  ID_1X                            %X80012345      DYNAMIC
UAF>

(go to: table of contents, index, list of vms_sys, prev: MOD_HOLDER, next: MOUNT)

28-SEP-1998 ZE.