Module ispf.lmmlist
Classes for ISPF member lists.
Functions
| open (dsname, enq) | Initializes and opens a PDS library. |
| close () | Closes and frees the library. |
| list () | Gets the list of members in a library. |
Functions
- open (dsname, enq)
-
Initializes and opens a PDS library.
You can call
lmmlist(...)as shorthand forlmmlist.open(...).Parameters:
- dsname
- enq
Returns:
-
A table that represents the new member list.
Usage:
-- Print the member names of the specifed library -- Library dsname supplied as command-line argument -- For example: LUA 'MYID.PDS' -- (single quotes indicate fully qualified dsname) local lmmlist = require("ispf.lmmlist") local dsname = arg[1] local enq = "shr" lmmlist(dsname, enq): map( function (member) print(member.name) end )
- close ()
-
Closes and frees the library.
Returns:
-
The return code from either the LMCLOSE or LMFREE service.
- list ()
-
Gets the list of members in a library.
Returns:
-
An iterator function that, each time it is called, returns the next member.
Usage:
local lmmlist = require("ispf.lmmlist") local dsname = "MYID.PDS" local library = lmmlist.open(dsname, "SHR") for member in library:list() do print(member.name) end
