Contents LDAP Interface Previous Next

LDAPS_MODIFY

Modifies an LDAP directory entry.

Syntax

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

1Handle
Numeric, input.
Specifies the connection handle returned by the LDAPS_OPEN CALL routine. The connection handle identifies the open connection to use when modifying the LDAP directory entry.

entryname
Character, input.
Names the directory entry to be modified.

rc
Numeric, output.
Receives a return code that indicates success or failure.

modifyType
Character, input.
Specifies the type of modification. Valid values are "ADD", "DELETE", and "REPLACE".

attr
Character, input.
Identifies the attribute to be modified.

numValues
Numeric, input.
Specifies the number of values to be modified for the specified attribute.

attrVal1, ...attrValN
Numeric or character, input.
Specifies zero or more attribute values, the number of which is specified by the numValues parameter.

Details

Zero or more attributes may 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, only the specified values will be deleted.

If the value of the modifyType parameter is REPLACE the existing attribute and all of its values are deleted and replaced with the specified attribute and its newly specified values.

Examples

The following example modifies the node associated with a distinguished name.

dn = "cn=alpair02.unx.com,o=Alpine 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);

The following example modifies a filter associated with an LDAP entry.

dn="sasSubscriberCn=JohnSmith,cn=sassubscribers,
sasComponent=sasPublishSubscribe,cn=SAS,o=Alpine 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);

Contents LDAP Interface Previous Next