SAS Institute. The Power to Know

SAS(R) 9.2 Integration Technologies: Directory Services Reference

Previous Page | Next Page

LDAP SCL Interface

_ADD



Adds a new entry to an LDAP directory
Syntax
Arguments
Details
Example

Syntax

_ADD(entryName, entry);

Arguments

entryName

names the new directory entry.

Type: Character
Direction: Input
entry

specifies the attributes and values of the new directory entry.

Type: SCL list
Direction: Input

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:

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

Previous Page | Next Page | Top of Page