SAS Institute. The Power to Know

SAS(R) 9.2 Integration Technologies: Directory Services Reference

Previous Page | Next Page

LDAP CALL Routine Interface

LDAPS_MODIFY



Modifies an LDAP directory entry
Syntax
Arguments
Details
Examples

Syntax

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

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
Direction: Input
entryname

names the directory entry to be modified.

Type: Character
Direction: Input
rc

receives a return code that indicates success or failure.

Type: Numeric
Direction: Output
modifyType

specifies the type of modification. Valid values are ADD, DELETE, and REPLACE.

Type: Character
Direction: Input
attr

identifies the attribute to be modified.

Type: Character
Direction: Input
numValues

specifies the number of values to be modified for the specified attribute.

Type: Numeric
Direction: Input
attrVal1, ...attrValN

specifies zero or more attribute values, the number of which is specified by the numValues parameter.

Type: Numeric or Character
Direction: 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

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);

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);

Previous Page | Next Page | Top of Page