LDAP Interface |
Opens a connection to an LDAP server.
CALL LDAPS_OPEN(lHandle, ldapServerName, port, base, bindDN, password, rc, <options>);
LDAP_BASE
.LDAP_BINDDN
is used as the bind distinguished name. If a value
of "" is specified and the LDAP_BINDDN
variable has not been set, an
unauthenticated bind is performed.bindDN
. If this
value is blank, the macro variable or environment variable LDAP_BINDPW
is used as the bind distinguished name. If a value of "" is specified
and the LDAP_BINDPW
variable has not been set, an unauthenticated bind
is performed.
Note: Specify only one search scope option. If multiple search scope options are specified, the one that appears last is used. If none of the search scope options are specified, the default value of SUBTREE_SEARCH_SCOPE is used.
The options specified in the LDAPS_OPEN CALL routine include only those that must be specified when the sever connected is first opened. Additional options can be specified after the connection is opened using the LDAPS_SETOPTIONS CALL routine.
The following example opens a connection to an LDAP server using using an anonymous bind and default session options.
server="alpair01.unx.com";port=8010; base="sasComponent=sasPublishSubscribe,cn=SAS,o=Alpine Airways,c=US"; bindDN=""; Pw=""; call LDAPS_OPEN(lHandle, server, port, base, bindDN, Pw, rc);
The following example opens a connection to an LDAP server, binds to the server, and passes in a session option of OPT_REFERRALS_OFF. This instructs the LDAP server not to chase referrals.
server = "alpair02.unx.com"; base = "o=Alpine Airways,c=US"; bindDN ="cn=John Doe,o=Alpine Airways,c=us"; bindPW ="myPass1"; option= "OPT_REFERRALS_OFF"; call LDAPS_OPEN(lHandle, server,8001,base,bindDN,bindPW,rc, option);
LDAP Interface |