Previous Topic: List Selection FunctionsNext Topic: Interconnection of the List Utilities


Display Member List Command

The list selection functions are provided by a general purpose Toolkit command, Display Member List (YDSPMBRLST). You may also use the command directly in your own CL programs in order to provide a selection list of available database file members for your users.

For example, the following CL statements would provide a display of all the members in file QTXTSRC in library QGPL, and allow one of them to be selected:

DCL VAR(&FILE) TYPE(*CHAR) LEN(10) VALUE(QTXTSRC) /*File */
DCL VAR(&LIB)  TYPE(*CHAR) LEN(10) VALUE(QGPL)  /*Library*/
DCL VAR(&MBR)  TYPE(*CHAR) LEN(10) VALUE(*ALL) /*Member */
DCL VAR(&FILEATR)  TYPE(*CHAR) LEN(10) VALUE(‘*PHY’) /*Type*/
DCL VAR(&TEXT) TYPE(*CHAR) LEN(10) VALUE (‘SELECT A TEXT MEMBER’) /*Text*/
YDSPMBRLST FILE(&FILE) LIB(&LIB) MBR(&MBR) FILEATR(&FILEATR) TEXT(&TEXT)

The name, file name, library and text of the selected member would be returned in the appropriate variables. You may specify that only members from files of a given format type are to be displayed.