JCL to list all datasets starting with

LISTING ALL DATASETS STARTING WITH A PARTICULCAR FIRST LEVEL QUALIFIER This JCL will search for all the Data sets starting with “USERID” as the first level qualifier The results will be written to spool (in SYSTSPRT).   It will also show the status (active / migrated) and other information.

//LISTDSN  JOB (XXXXXXXX,,,,,XXXX),’         ‘,             //             CLASS=J,MSGCLASS=T,NOTIFY=&SYSUID,           //LISTDS   EXEC PGM=IKJEFT1B                                 EXEC ‘SYS1.SAMPLIB(IGGCSIRX)’ EXEC