There is a requirement which running below operations in batch mode.
1. Type 3.4 under ISPF and go into DS list panel;
2. Then type HLQ.A.B*.C*, and press enter;
3. Get the data set list after above operations and store it in a dataset.

The question is that, is it possible to implement above requirement by pure JCL without REXX or CLIST?

And it would be quite appreciated if you could provide a "hello world"-like JCL example which interfaces with ISPF services. Then I might change and revision it by referring to IBM redbooks.

Hi,
I have a doubt. When we use OPTION(SAVE) in LMDLIST, is it possible to route the output to a user defined dataset?

The manual says, we can give GROUP and the output dataset would be userid.group.DATASETS or prefix.userid.group.DATASETS. I have many dataset masks for which i need the matching dataset list. So for each LMDLIST command the dataset userid.group.DATASETS would be over written. To avoid this I want to use different dataset names for each LMDLIST.

a better alternative would be the use of the IGGCSI00 catalog interface
which has a much better filtering capability
and can report according to the required pattern layout
search the forums for samples on its usage

Thanks for your response. I have written the contents of the default file to a personal dataset. Below is my code. Now I am getting RC as 10 for the second time execution of LMDLIST and LMDFREE command, (RC for LMDINIT is 0). Only for the first mask i am getting expected results - list being saved in default dataset, contents are copied to personal dataset, deleting default dataset, all commands give RC 0.

Note:
I am running this REXX in JCL, so allocated all the files in the JCL.