Modify
Modifying an entry is restricted as follows:
- Only the entry DN hcdIodfId=...,suffix and below can be modified. Modification of DN suffix is not supported.
- Check IODF data model to see which object classes can be modified.
- The HCD LDAP backend only supports the delete and replace subcommands of modify. The add subcommand is NOT supported.
- The value of the object class attribute cannot be deleted or replaced.
- The value(s) of the attributes which are contained in the entry's RDN cannot be deleted or replaced.
- One modify request to a single entry can contain a sequence of delete and replace subcommands. This sequence can be considered as atomic: Either the whole sequence is performed or nothing is performed.
- One attribute can only be referenced once in the whole modify request. It can only be deleted once, replaced once, and only either be deleted or replaced.
- Modify delete only supports the deletion of all values of an attribute. For this reason, you must not specify values in the modify delete request. If a value is specified, the whole modify request is rejected by the HCD LDAP backend.
- Attributes described as mandatory in an object class must not be deleted
- Modify replace replaces all existing values of the given attribute with the new values listed, creating the attribute if it did not already exist. A replace with no value will delete the entire attribute if it exists, and is ignored if the attribute did not exist.
- All values must conform with the type specified in the attribute definition.
- Modifying an entry may cause other entries to be modified automatically. See IODF data model.
- Two controls are supported for the LDAP modify request. See Transactions for details.
Example:
The entry created in Add can be modified by adding the attribute hcdDescription as follows.
First create a
data set member named TEST.LDIF(REPCU100) with the content
dn:hcdControlUnitNumber=0100,hcdIodfId=TEST.IODF00.WORK,suffix
changetype:modify
replace:x
hcdDescription:New description
Then
call the LDAP command line utility ldapmodify with the following parameters:
ldapmodify -D "racfid=TEST,profiletype=user,sysplex=sysplex1" -w "passwd"
-f //'TEST.LDIF(REPCU100)'
If
the modify request completes successfully, the entry will look like:
hcdControlUnitNumber=0100,hcdIodfId=TEST.IODF00.WORK,suffix
objectClass=hcdControlUnit
hcdControlUnitNumber=0100
hcdUnit=3990
hcdDescription=New description
This hcdDescription can now be deleted again with the delete subrequest of modify.
To do this, first create a data set member named TEST.LDIF(DELCU100) with the
content
dn:hcdControlUnitNumber=0100,hcdIodfId=TEST.IODF00.WORK,suffix
changetype:modify
delete:hcdDescription
-
Then
issue the following command:
ldapmodify -D "racfid=TEST,profiletype=user,sysplex=sysplex1" -w "passwd"
-f //'TEST.LDIF(DELCU100)'