IBM Support

Searching the system directory entries

Question & Answer


Question

How can I search the system directory entries.

Cause

Searching the system directory entries can be useful, such as looking up a SMTP name (From email address) to see what user id it is associated with.

Answer

You can use the DSPDIRE command to do an interactive search. You can prompt this command to change the search parameters or to specify the output is printed to spool file or to an outfile.

The DSPDIRE command will give you a list of entries depending on your search criteria. You search further by pressing the F10 key to Search directory. Here you could search on different directory entry information. Hit enter and here it will give you an option to display the details or print the details.

If you need to do a more complex search and want to do it programmatically, then you can use the Search System Directory (QOKSCHD) API. The Search System Directory API searches the system distribution directory and returns user information that matches the criteria input.. It also is used to query fields in the directory. It is most useful when the system distribution directory is used as a repository for information about users, and can be used in a program to query this information. The API will also let you search by SMTP name in such a case you wanted to know what user id is associated with a From email address. See the following for further information about the API:

V6R1


http://www.ibm.com/support/knowledgecenter/ssw_ibm_i_61/apis/QOKSCHD.htm

V7R1


http://www.ibm.com/support/knowledgecenter/ssw_ibm_i_71/apis/QOKSCHD.htm

V7R2


http://www.ibm.com/support/knowledgecenter/ssw_ibm_i_72/apis/QOKSCHD.htm
V7R3
http://www.ibm.com/support/knowledgecenter/ssw_ibm_i_73/apis/QOKSCHD.htm

[{"Type":"MASTER","Line of Business":{"code":"LOB57","label":"Power"},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SWG60","label":"IBM i"},"Platform":[{"code":"PF012","label":"IBM i"}],"Version":"7.1.0"}]

Document Information

Modified date:
18 December 2019

UID

nas8N1021504