Like any program that requires ISPF Services, it needs to run from within a TSO/ISPF environment. So, in batch, you need to execute PGM=IKJEFT01, you need to start ISPF and your program (with the ISPSTART command) and you need all of the necessary ISPF Library Definitions in your JCL. Also, from the manual:
You must complete the LMINIT and LMOPEN services before using LMMLIST. Use the LMMLIST FREE option to release the list storage space when it is not needed.
and, as you probably know, the individual member names can be retrieved from the appropriate dialog variable.
I've posted an example COBOL program here
as a working example.