1. Specify SYSLOG write outclass
CMD==/W L
2. Start write PROC
You should have a PROC like below, to write SYSLOG to dataset, usually in your site PROCLIB.
CMD==/S CPFSLOGW.stepname,,,L
//IEFPROC EXEC PGM=IASXWR00,PARM='PL'
//IEFRDER DD DSN=MIB.SYSLOG(+1),
// DISP=(NEW,CATLG),UNIT=SYSDA,SPACE=(CYL,(90,80),RLSE),
// DCB=(MIB.SYSLOG.DSCB,BUFNO=5,BUFL=4088)
//IEFPROC EXEC PGM=IASXWR00,PARM='PL'
//IEFRDER DD DSN=MIB.SYSLOG(+1),
// DISP=(NEW,CATLG),UNIT=SYSDA,SPACE=(CYL,(90,80),RLSE),
// DCB=(MIB.SYSLOG.DSCB,BUFNO=5,BUFL=4088)
3. Wait until this message pop up
IEF176I WTR L WAITING FOR WORK, CLASS=L, DEST=LOCAL
4. Stop PROC
CMD==/P CPFSLOGW.stepname
After all, if you want to make this happen automatically, eg. run every week, you probably need to schedule 3 jobs for step 1&2&4 in sequence, with some workload automation tool such as CA ESP or IBM TWS or BMC Control-M.