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


LMCLOSE—close a data set

z/OS ISPF Services Guide
SC19-3626-00

The LMCLOSE service closes the data set associated with a given data ID. For each LMOPEN invocation, you should invoke a matching LMCLOSE service when processing is complete. Otherwise, unwanted data can be read from or written to the data set.

If LMINIT is issued with an enqueue (ENQ) of SHRW and LMOPEN is issued with the OUTPUT option, it is important that an LMCLOSE be issued when the dialog has finished processing the data set, since the DASD volume is reserved until LMCLOSE is invoked. On output, if the data is sequential, the LMCLOSE service writes the last physical block.

Command invocation format

Read syntax diagramSkip visual syntax diagram
>>-ISPEXEC--LMCLOSE--DATAID(data-id)---------------------------><

Call invocation format

Read syntax diagramSkip visual syntax diagram
>>-CALL--ISPLINK--('LMCLOSEb',data-id);------------------------><

or

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

Parameters

data-id
The data ID associated with the data set to be closed. The data ID is generated by the LMINIT service. The maximum length of this parameter is 8 characters.
buf-len
A fullword fixed binary integer containing the length of the buffer parameter.
buffer
A buffer containing the name of the service and its parameters in the same form as they would appear in an ISPEXEC invocation for a command invocation.

Return codes

These return codes are possible:
 0
Normal completion.
 8
Data set is not open.
10
No ISPF library or data set associated with the given data ID; that is, LMINIT has not been completed.
20
Severe error; unable to continue.

Example

This example invokes the LMCLOSE service to close the data set associated with the data ID in variable DDVAR.

Command invocation

ISPEXEC LMCLOSE DATAID(&DDVAR)

Call invocation

CALL ISPLINK('LMCLOSE ',DDVAR);
OR
Set the program variable BUFFER to contain:
BUFFER = 'LMCLOSE DATAID(&DDVAR)';
Set the program variable BUFLEN to the length of the variable BUFFER. Issue the command:
CALL ISPEXEC (BUFLEN, BUFFER);

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014