LMCLOSE—close a data set

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.