| LDAP SCL Interface |
| Syntax | |
| Arguments | |
| Details | |
| Example |
Syntax |
| _ADD(entryName, entry); |
| entryName |
names the new directory entry.
| ||||
| entry |
specifies the attributes and values of the new directory entry.
|
| Details |
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. |
| Example |
The following example adds an entry to an LDAP directory by creating three attribute and 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=Alphalite 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);
Copyright © 2008 by SAS Institute Inc., Cary, NC, USA. All rights reserved.