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