LDAP SCL Interface |
Adds a new entry to an LDAP directory.
_ADD(entryName, entry);
When invoked on an LDAPSERVICES instance, the _add
method adds a
new entry to the specified LDAP directory.
The entry parameter is an SCL list that specifies the attributes of the new
directory entry, as well as the values associated with each attribute. The
format of the entry
parameter is a list of lists. Each list
contains the attribute name as well as its values and should have the
following format:
Item Number Value ----------- ----- 1 Character value representing the attribute name. 2 Numeric or character attribute value. ... n Numeric or character attribute value.
The following example adds an entry to an LDAP directory by creating three
attribute/value lists, combining the three lists, and using the combined list
as the entry
parameter in the _ADD
method.
dn = "cn=myhost.pc.com,o=Alpine Airways,c=US"; entry = makelist(); alist1 = makelist(); rc = insertc(alist1, "objectclass", -1); rc = insertc(alist1, "SASDomain", -1); alist2 = makelist(); rc = insertc(alist2, "cn", -1); rc = insertc(alist2, server, -1); alist3 = makelist(); rc = insertc(alist3, "node", -1); rc = insertc(alist3, "oak.unx.com", -1); rc = insertl(entry, alist1, -1); rc = insertl(entry, alist2, -1); rc = insertl(entry, alist3, -1); rc = ds._ADD(dn,entry); rc = dellist(alist1); rc = dellist(alist2); rc = dellist(alist3);
LDAP SCL Interface |