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


LMFREE—free data set from its association with data ID

z/OS ISPF Services Guide
SC19-3626-00

The LMFREE service removes a data ID that was generated by the LMINIT service. The ISPF library, concatenated ISPF libraries, or data set is no longer associated with the specified data ID. If the data set is still open, LMFREE closes it.

After LMFREE is invoked, that data ID can no longer be used to identify the data set for processing by other ISPF services that require data IDs. If the data ID is not allocated by using the DDNAME parameter in LMINIT, the allocation for the data set is also freed. If the data ID represents a concatenated set of ISPF libraries, the data sets are freed and are no longer concatenated.

For each LMINIT invocation, you should invoke a matching LMFREE service when the data ID is no longer needed. Otherwise, the ISPF library or data set associated with the data ID is not released until ISPF terminates.

If you modify the data sets associated with a data ID, then you must invoke the LMFREE and LMINIT services for the data ID before processing the data sets with another service. Failure to update the directory blocks associated with the data ID may cause I/O errors.

Command invocation format

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

Call invocation format

Read syntax diagramSkip visual syntax diagram
>>-CALL--ISPLINK('LMFREEbb',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 released. The data ID has been 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
Free data ID failed; the error condition is described in System variables used to format error messages.
10
No ISPF library or data set is associated with the given data ID; that is, LMINIT has not been completed.
20
Severe error; unable to continue.

Example

This example invokes the LMFREE service to release the data set associated with the data ID in variable DDVAR.

Command invocation

ISPEXEC LMFREE DATAID(&DDVAR)

Call invocation

CALL ISPLINK('LMFREE  ',DDVAR);
OR
 
Set the program variable BUFFER to contain:
BUFFER = 'LMFREE 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