z/OS ISPF Services Guide
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


LMDINIT—initialize a data set list

z/OS ISPF Services Guide
SC19-3626-00

The LMDINIT service generates a data set list ID for a given data set level or volume or both. A dialog uses the dslist ID to obtain a list of data sets and data set information from the data set list service (LMDLIST). The LMDINIT service is similar to the function provided by the LMINIT service.

To use LMDINIT, you must specify:
  • A data set level or volume or both
  • The name of the variable for LMDINIT to place the new dslist ID.

Each use of the LMDINIT service must eventually be followed by the LMDFREE service to release the dslist ID and the data set list storage space.

Command invocation format

Read syntax diagramSkip visual syntax diagram
>>-ISPEXEC--LMDINIT--LISTID(dslist-id-var)---------------------->

>--+-LEVEL(dsname-level)---+-----------------------------------><
   '-VOLUME(volume-serial)-'   

Call invocation format

Read syntax diagramSkip visual syntax diagram
>>-CALL--ISPLINK--('LMDINITb'--,dslist-id-var--,---------------->

>--+--------------+--,--+---------------+--);------------------><
   '-dsname-level-'     '-volume-serial-'       

or

Read syntax diagramSkip visual syntax diagram
>>-CALL--ISPEXEC--(buf-len,--buffer);--------------------------><

Parameters

dslist-id-var
The name of the ISPF function pool variable that stores the dslist ID of the data set list. The LMDINIT service always generates a unique dslist ID. The dslist ID is an input variable to the other library access services that work with data sets, and is an output parameter from the LMDINIT service. The maximum length for the dslist ID is 8 characters.

To invoke the service, you must specify the dslist ID variable name and Level, Volume, or both.

In the LMDINIT service, dslist-id-var is the name of the variable that stores the data ID (for example, LISTID(DDVAR)). When you use the dslist ID keyword with other services, you must pass the value of the variable (for example, LISTID(&DDVAR)).

dsname-level
You may use this value to specify the level or levels of data sets displayed with the dslist ID. The dsname-level is a string containing valid TSO data set name qualifier patterns, separated by periods ('.'). You can use asterisks and percent signs as wildcards in the qualifiers. When the Call Invocation format using the ISPLINK interface is used, the dsname-level parameter supports system symbols. The LMDINIT service does not select data sets with fewer levels than the dsname-level. You may also use an optional data set list exit to control which data sets are included in the list.
volume-serial
Use this value to specify the volume serial of the VTOC that ISPF will use to generate the list of data sets. When the Call Invocation format using the ISPLINK interface is used, the volume-serial parameter supports system symbols. This field has the same restrictions and syntax as the Volume field under ISPF, option 3.4. See the z/OS ISPF User's Guide Vol II for a complete description.

Return codes

 0
Normal completion. LMDINIT returns a unique dslist ID in the variable specified in keyword LISTID.
 8
The dslist ID was not created; the error condition is described in System variables used to format error messages.
12
A keyword value is incorrect.
16
A truncation or translation error occurred in accessing dialog variables.
20
Severe error; unable to continue.

Examples

Here are some examples of the LMDINIT service:

Example 1:

In this example the LMDINIT service generates a dslist ID for a data set list containing only the data sets in volume APL001. The LMDINIT service places the dslist ID in variable VARNAME in the ISPF function pool.

Command invocation

ISPEXEC LMDINIT LISTID(VARNAME) VOLUME(APL001);

Call invocation

DCL DSVAR CHAR(8)
CALL ISPLINK   ('VDEFINE ', 'DSVAR ', DSVAR, 'CHAR    ',L8);

CALL ISPLINK   ('LMDINIT ', 'DSVAR ', ' ', 'APL001 ');

OR
Set the program variable BUFFER to contain:
BUFFER = 'LMDINIT LISTID(VARNAME) VOLUME(APL001)';
Set the program variable BUFLEN to the length of the variable BUFFER. Issue the command:
CALL ISPEXEC (BUFLEN, BUFFER);

Example 2:

In this example the LMDINIT service generates a dslist ID for a data set list containing only the data sets with the first level qualifier "PROD" and a second level qualifier starting with "ABC".

Command invocation

ISPEXEC LMDINIT LISTID(VARNAME) LEVEL(PROD.ABC*);

Call invocation

DCL DSVAR CHAR(8)
CALL ISPLINK   ('VDEFINE ', 'DSVAR ', DSVAR, 'CHAR    ',L8);

CALL ISPLINK   ('LMDINIT ', 'DSVAR ', 'PROD.ABC* ');

OR
Set the program variable BUFFER to contain:
BUFFER = 'LMDINIT LISTID(VARNAME) LEVEL(PROD.ABC*)';
Set the program variable BUFLEN to the length of the variable BUFFER. Issue the command:
CALL ISPEXEC (BUFLEN, BUFFER);

Call invocation

In a CLIST, define the variable DSNLVL to contain a data set prefix of SYS2, and the second qualifier to that of the sysplex on which the command is executed.
SET DSNLVL = SYS2.&&SYSPLEX
ISPEXEC VSYM (DSNLVL)

When executed on a system that is a member of a sysplex named SYSPLEX1, the resulting value of DSNLVL is SYS2.SYSPLEX1.

The same example in REXX is:
DSNLVL = 'SYS2.&SYSPLEX'
address "ISPEXEC"
"VSYM (DSNLVL)"

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014