Previous topic |
Next topic |
Contents |
Contact z/OS |
Library |
PDF
LMOPEN—open a data set z/OS ISPF Services Guide SC19-3626-00 |
|
The LMOPEN service opens the data set associated with a given data ID so the data set can be either read from, using LMGET, or written to, using LMPUT. The LMINIT service must be completed before LMOPEN can be used. For each LMOPEN invocation, you should invoke a matching LMCLOSE service. The LMCLOSE service closes the data set to further processing until LMOPEN is invoked again for that data set's data ID. Therefore, you should invoke the LMCLOSE service when processing is completed for that data set. Otherwise, unwanted data can be read from or written to the data set. Note: Some library access services do not require that LMOPEN be executed
before invocation (for example, LMCOPY and LMMOVE). See the service
description to determine whether LMOPEN should be invoked.
It is the responsibility of the dialog developer to ensure that a data set is opened for output only once. ISPF does not protect against this situation. From the time LMOPEN for output is invoked until LMCLOSE is invoked, there are certain restrictions on what can be done. Do not invoke the EDIT, DISPLAY, or TBDISPL services. Displaying any panel at all may allow the user to edit the already opened data set or invoke a dialog that opens the same data set for output. Command invocation formatCall invocation formatParameters
Return codesThese return codes are possible:
ExampleThis example invokes the LMOPEN service to open the data set associated with the data ID in variable DDVAR for reading. The record length is to be returned in variable DLVAR, the record format in RFVAR, and the data set organization in ORGVAR. Command invocation
Call invocation
Set the program variable BUFFER to contain:
Set the program variable BUFLEN to the length of the variable BUFFER.
Issue the command:
|
Copyright IBM Corporation 1990, 2014
|