SEARCH

LANSA Integrator

SEARCH

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

 

                                                           Required

 

 SEARCH ---------- DN -------------- entry name ------------------>

 

               >-- SCOPE ----------- *SUB ------------------------>

                                     *ONE

                                     *BASE

 

                                                           Optional

 

               >-- FILTER ---------- *NONE -----------------------|

                                     value

 

Keywords

DN

This keyword will be used to define the base DN to search for.

This keyword is mandatory.

SCOPE

This keyword defines the scope, or range, of the entries to search.

There are three possible values:

*SUB - run the search over the base DN and all its entries within its sub-trees.

*ONE - run the search over the entries under the base DN.

*BASE - run the search over the base DN alone.

*SUB is the default value.

This keyword is optional.

FILTER

This keyword can be used to specify a filter for this search criteria.

The default value is *NONE.

This keyword is optional.

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:

  • The field is mandatory and will contain the DN value for each retrieved DN.
    Suggested field length: you will need to ensure that the field is long enough to hold the DN value of your LDAP Server. The field will be character.

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 3GL applications, refer to Java Service Manager Clients.

Examples

RDML

 

DEFINE FIELD(#DN) TYPE(*CHAR) LENGTH(050)

DEF_LIST NAME(#WRKLST) FIELDS(#DN) TYPE(*WORKING)

CHANGE FIELD(#JSMCMD) TO('''SEARCH DN(o=ibmteldir) FILTER(objectclass=person) SCOPE(*SUB) SERVICE_LIST(DN)''')

USE BUILTIN(JSM_COMMAND) WITH_ARGS(#JSMCMD) TO_GET(#JSMSTS #JSMMSG #WRKLST)

 

RDMLX

 

Define Field(#DN) Type(*CHAR) Length(050)

Def_List Name(#WRKLST) Fields(#DN) Type(*Working)

#JSMCMD := Search DN(o=ibmteldir) Filter(objectclass=person) Scope(*SUB) Service_List(DN)'

Use Builtin(JSMX_COMMAND) With_Args(#JSMHND #JSMCMD) To_Get(#JSMSTS #JSMMSG #WRKLST)