问题
The above JCL it only prints the file name in the spool,but we need to get all the files available with LCDT.TEST.FINAL.G* in one of the output file. So how can we achieve this by writing all the availble files with LCDT.TEST.FINAL.G* in the output file.
回答1:
Your list of datasets is in the spool because that's where you route them by coding...
//SYSPRINT DD SYSOUT=*
Route your SYSPRINT DD to a dataset instead of to the spool by coding...
//SYSPRINT DD DISP=(NEW,CATLG,DELETE),
// DSN=&SYSUID..LCDT.DATASET.LIST,
// SPACE=(TRK,(10,10),RLSE)
...and IDCAMS should provide the appropriate RECFM and LRECL.
来源:https://stackoverflow.com/questions/60671602/how-to-list-all-the-files-in-the-output-file-using-listcat-in-jcl