SAS Institute. The Power to Know

SAS(R) 9.2 Integration Technologies: Directory Services Reference

Previous Page | Next Page

LDAP SCL Interface

_SETOPTIONS



Sets options on an open LDAP server session
Syntax
Arguments
Details
Examples

Syntax

_SETOPTIONS(timeLimit, sizeLimit, base, referral, restart, property, propertyValue);

Arguments

timeLimit

specifies the maximum number of seconds that the client is willing to wait for a response to a search request. The value 0 indicates no time limit. The time limit is set to 0 by default. The default value is in effect until it is changed. The value -1 indicates that the existing value is to remain unchanged.

Type: Numeric
Direction: Input
sizeLimit

specifies the maximum number of entries to return in a search result. The value 0 indicates no size limit. The size limit is set to 0 by default. The default value remains in effect until it is changed. The value -1 indicates that the existing value is to remain unchanged.

Type: Numeric
Direction: Input
base

specifies the base object for the search operation, which must be a distinguished name. An initial base object was specified when the connection to the LDAP server was established. Specifying a non-blank value for the base parameter overrides the existing base object definition. Specifying a blank value retains the existing value.

Type: Character
Direction: Input
referral

indicates whether to chase referrals, by setting either the OPT_REFERRALS_ON option or the OPT_REFERRALS_OFF option. One or the other of these options was specified when the connection to the LDAP server was established. Specifying either option as the value of the referral parameter overrides the existing value. Specifying a blank value retains the existing value.

Type: Character
Direction: Input
restart

indicates whether to restart a query if error condition EINTR occurs. At _open time, the default session settings are determined. The _SETOPTIONS method can be used to change these defaults. Valid values for restart are OPT_RESTART_ON or OPT_RESTART_OFF. A blank value can be passed in to indicate that the default value of OPT_RESTART_OFF should be used.

Type: Character
Direction: Input
property

specifies the name of an optional property that is being set. Currently, the only property that is supported is the SEARCH_SCOPE property, which specifies the scope of searches in the LDAP directory. Specify the value of the property by using the propertyValue parameter.

Type: Character
Direction: Input
propertyValue

specifies the value for the property parameter. Valid values for the SEARCH_SCOPE property are as follows:

SUBTREE_SEARCH_SCOPE

sets the scope of the search to include all subtrees. This is the default value.

BASE_SEARCH_SCOPE

sets the scope of the search to include only the base. This value overrides the default value of SUBTREE_SEARCH_SCOPE.

ONELEVEL_SEARCH_SCOPE

sets the scope of the search to include the base and one additional level. This value overrides the default value of SUBTREE_SEARCH_SCOPE.

Type: Character
Direction: Input

Details

When invoked on an LDAPSERVICES instance, the _SETOPTIONS method configures an LDAP session by changing session options. Once changed, these values remain in effect until they are overridden by a subsequent call.


Examples

The following example sets various session options.

timelimit=120;
sizelimit=100;
base=''; /* use default set at _open time */
referral = OPT_REFERRALS_OFF;
restart = ; /* use default */
rc = ds._SETOPTIONS(timelimit, sizelimit, base, referral, restart);

The following example uses the optional properties parameter to set the search scope.

timelimit = -1; /* use current setting */
sizelimit = -1; /* use current setting */
base=''; /* use default set at _open time */
referral = ; /* use default set at _open time */
restart = ; /* use default */
prop = SEARCH_SCOPE;
propValue = BASE_SEARCH_SCOPE; /* only search the base */
rc = ds._setOptions(timelimit, sizelimit, base, referral, restart, prop, propValue);

Previous Page | Next Page | Top of Page