5.18.7 SEARCH

You will use this command to search for entries on the LDAP server.

Syntax:

Command

Keyword

Value

Developer notes

SEARCH

DN

 

Required. Define the base DN to search for.

SCOPE

*ONE

Optional. Run the search over the entries under the base DN.

*BASE

Run the search over the base DN alone.

*SUB

Default. Run the search over the base DN and all its entries within its sub-trees.

FILTER

value

Optional. Specify a filter for this search criteria.

*NONE

Default.

 

Lists and Variables

The application must supply a working list to which the SEARCH command will pass the retrieved DN values. The working list must contain one field as follows:

Refer to the following examples to see how this works. For information on how to supply a working list to service commands from RDML, RDMLX or RPG applications, refer to Java Service Manager Clients.

Example

SEARCH DN(o=ibmteldir) FILTER(objectclass=person) SCOPE(*SUB) #WRKLST(DN)