The SEARCH_LDAP call
The SEARCH_LDAP call sends a search request to a specified LDAP server. The search specifies an LDAP distinguished name, that is the target of the search.
The search returns a series of results (attributes or entries) that can be browsed or selected. An entry is an LDAP record, and an attribute is one element within an entry.
SEARCH_LDAP
DFHDDAPX [CALL],
[CLEAR],
[IN,
FUNCTION(SEARCH_LDAP),
LDAP_SESSION_TOKEN(name4),
DISTINGUISHED_NAME(block-descriptor),
[FILTER(block-descriptor),]
[SEARCH_TIME_LIMIT(name4),]]
[OUT,
SEARCH_TOKEN(name4),
[LDAP_RESPONSE(name4),]
[ENTRY_COUNT(name4),]
RESPONSE(name1 | *),
REASON(name1 | *)]This command is threadsafe.
- DISTINGUISHED_NAME(block-descriptor)
- specifies the location of the LDAP distinguished name. The block-descriptor is two fullwords of data, in which the first word contains the address of the data, and the second word contains the length in bytes of the data. For more information on block-descriptors, see XPI syntax.
- ENTRY_COUNT(name4)
- the number of LDAP entries returned by the search.
- FILTER(block-descriptor)
- specifies the location of an LDAP filter string that
limits the search. If this parameter is not specified or is zero,
the search filter is set to
(objectClass=*). The block-descriptor is two fullwords of data, in which the first word contains the address of the data, and the second word contains the length in bytes of the data. For more information on block-descriptors, see XPI syntax. - LDAP_RESPONSE(name4)
- specifies the return code that is sent by the LDAP API.
- LDAP_SESSION_TOKEN(name4)
- the name of the fullword token that was returned by the BIND_LDAP function.
- SEARCH_TIME_LIMIT(name4)
- specifies the time limit for the search (in seconds). If the search is not successful within this time limit, the search is abandoned. If this parameter is not specified or is zero, the search time is unlimited.
- SEARCH_TOKEN(name4)
- the name of the fullword token that identifies and holds the current position in the search.
RESPONSE and REASON values for SEARCH_LDAP
| RESPONSE | REASON |
|---|---|
| OK | None |
| EXCEPTION | INVALID_BUFFER_LENGTH |
| INVALID_TOKEN | |
| NOTFOUND | |
| TIMED_OUT | |
| LDAP_INACTIVE | |
| DISASTER | None |
| INVALID | None |
| KERNERROR | None |
| PURGED | None |
Note: For more detail, refer to the explanation of RESPONSE
and REASON in Making an XPI call.