JCL itself does absolutely nothing, it is just a weird language to control/define the execution of "PROGRAMS"

Asking to do something with jcl has absolutely no meaning ...
trhu jcl You can invoke utilities, programs, and cause some side effects on datasets,
programs are the things which manipulate data.

One sample of such a task is to invoke IDCAMS to get a listing of catalogued datasets, or IEHLIST to get a listing of a disk VTOC.

Also...

asking on how to do something is a fair question, there are many ways of doing things,
asking on how to do something indicating the tool means that You have the skills to choose between different alternatives,
and You already used Your knowledge to choose the one which best suits Your needs.

It is just impossible to do what You ask for by using plain jcl.
You need to run/execute some kind of program ( an utility is just a program )...
it could be a system utility, some utility written by a third party
( fileaid for example -
I do not imply that fileaid might be used, it is just an example of a third party utility suite )

So please do not react strongly when somebody gives You a solution
which disagrees with Your expectations

Exploring The volume application of the ISMF main menu could be a good starting point
at least to get a volume list from where to proceed with further searches.

if the datasets are cataloged, using the 3.4 and issuing a "save" command on the file list will save the dataset list into a sequiential file...

if the datasets are not cataloged, then You have to add to the 3.4 screen also the volume, and then same as before.

I do not have tso handy now but the ISMF dataset application will give You more freedom in selecting the dataset mask

Still if You want to run the process in batch Yo have to find some third party utility or write You own application

even better the DCOLLECT command will unload to a sequential file all the dataset info in one single shot, then with a simple application You can extract
all the info You need

the main point here is that if You want to collect info on uncataloged dataset, getting a list of the volumes might be a tedious task,
but if Your environment is full SMS then You should not have any uncataloged datasets, so the ISMF dataset application should give You whart You need