|
Directory Services
_MODIFYModifies an LDAP directory entry. Syntax_MODIFY(entryName, attrs);
DetailsWhen invoked on an LDAPSERVICES instance, the _MODIFY method modifies the attributes and attribute values in an LDAP directory entry.
The Item Number Value ----------- ----- 1 Character value representing the type of modification, which can be "ADD", "DELETE", or "REPLACE". 2 Character value representing an attribute name. 3 Numeric or character attribute value. ... n Numeric or character attribute value. If the type of modification is DELETE and if no attribute values are specified, the entire attribute and all values are deleted. If DELETE is specified with one or more attribute values, only the specified values are deleted. If the type of modification is REPLACE, the existing attribute is deleted and is replaced with the specified attribute and attribute values. You must specify all attribute values, because all of the existing attribute values are replaced with the attribute values specified with this method. ExampleThe following example modifies three attributes in an LDAP directory entry. dn = "cn=srvr01.unx.com,o=Alphalite Airways,c=US"; entry = makelist(); alist1 = makelist(); rc = insertc(alist1, "ADD", -1); /* modify type */ rc = insertc(alist1, "sasFrequency", -1); /* attribute name */ rc = insertc(alist1, "monthly", -1); /* attribute value */ rc = insertc(alist1, "weekly", -1); /* attribute value */ alist2 = makelist(); rc = insertc(alist2, "DELETE", -1); /* modify type */ rc = insertc(alist2, "sasNameValueFilter", -1); /* attribute name */ alist3 = makelist(); rc = insertc(alist3, "REPLACE", -1); /* modify type */ rc = insertc(alist3, "sasDeliveryTransport", -1); /* attribute name */ rc = insertc(alist3, "email", -1); rc = insertl(entry, alist1, -1); rc = insertl(entry, alist2, -1); rc = insertl(entry, alist3, -1); rc = ds._MODIFY(dn,entry); rc = dellist(alist1); rc = dellist(alist2); rc = dellist(alist3); |