- Learn how to run AMBLIST in batch and write the SYSPRINT output to a data set. You will have to replicate this in your TSO session using the ALLOCATE and CALL commands to simulate the EXEC statement and DD statements. You will need to write Rexx code to initialize the SYSIN data set for AMBLIST. The documentation for AMBLIST, if you do not already know this, is in MVS Diagnosis: Tools and Service Aids for your z/OS release. AMBLIST has 4 major functions: LISTLOAD, LISTIDR, LISTOBJ and LISTLPA. I think LISTLOAD or LISTIDR will do what you want.
- Examine the SYSPRINT output to find the data you are interested in.
- Write the Rexx code to examine the SYSPRINT output and produce the output you want.
- Combine the Rexx code in the previous bullet with the Rexx code discussed in the first bullet.
Since you never bothered to tell us what you are looking for in the first place, this is the best I (or most likely anyone else) can do. There may be shortcuts or simpler ways to obtain the data you really want, but unless you tell us what you think you need, no one can tell you.