This would require a CL program
1. Create a file listing all files to be journalled
DSPFD FILE(LIB1/*ALL) TYPE(*BASATR) OUTPUT(*OUTFILE) FILEATR(*PF) OUTFILE(LIB1/PFLIST)
2. the CL
monmsg cpf0000 then goto End
STRJRNPF FILE(&ATLIB/&ATFILE) JRN(MYLIB/MYJRN)
Instead of monitoring for CPF0000, which is a global monitor for any error, it is much better to monitor for the specific end of file condition, which is message ID CPF0864. Otherwise, any error condition would be ignored, the program would end, and you’d not know whether all of the records were processed.
In my opinion, a global monitor should be used on a very limited basis. It can be acceptable in certain situations, but not for reading through a data file, unless the program also includes a way to communicate that error condition to the person running the job.