LDAPS_MODIFY

Modifies an LDAP directory entry

Syntax

CALL LDAPS_MODIFY(lHandle, entryName, rc, modifyType1, attr1, numValues1
<, attr1Val1, …attr1ValN> <…, modifyTypeN, attrN, numValuesN<, attrNVal1…, attrNValN>> );

Required Arguments

1Handle
specifies the connection handle that is returned by the LDAPS_OPEN CALL routine. The connection handle identifies the open connection to use when modifying the LDAP directory entry.
Type:Numeric, Input
entryname
names the directory entry to be modified.
Type:Character, Input
rc
receives a return code that indicates success or failure.
Type:Numeric, Output
modifyType
specifies the type of modification. Valid values are ADD, DELETE, and REPLACE.
Type:Character, Input
attr
identifies the attribute to be modified.
Type:Character, Input
numValues
specifies the number of values to be modified for the specified attribute.
Type:Numeric, Input

Optional Argument

attrVal1, …attrValN
specifies zero or more attribute values, the number of which is specified by the numValues parameter.
Type:Numeric or Character, Input

Details

Zero or more attributes can be specified.
If the value of the modifyType parameter is DELETE and if the value of the numValues parameter is 0, then the entire attribute and all of its values are deleted.
If the value of the modifyType parameter is DELETE and if the value of the numValues parameter is 1 or greater, then only the specified values will be deleted.
If the value of the modifyType parameter is REPLACE, then the existing attribute and all of its values are deleted and replaced with the specified attribute and its newly specified values.

Examples

Example 1

The following example modifies the node associated with a distinguished name.
dn = "cn=alpair02.unx.com,o=Alphalite Airways,c=US";

attrName = "objectclass";
objValue = "SASDomain";

attrName2 = "node";
nodeValue = "oak.unx.com";

CALL LDAPS_MODIFY(lHandle, dn, rc, "ADD", attrName, 1, objValue,
   "DELETE", attrName2, 0);

Example 2

The following example modifies a filter associated with an LDAP entry.
dn="sasSubscriberCn=JohnSmith,cn=sassubscribers,
sasComponent=sasPublishSubscribe,cn=SAS,o=Alphalite Airways,c=US";

attrName = "sasDescription";

attrName2 = "sasEntryInclusionFilter";
val = "gif";
val2 = "dataset";
htmlvalue = "html";

CALL LDAPS_MODIFY(lHandle, dn, rc, "DELETE", attrName, 0, "REPLACE",
   attrName2, 3, val, val2, htmlvalue);