Very Simple MAILSPLF sample that attempts to send a report via email. If the email fails (CPF9898), the job will send a message to QSYSOPR.
This is a nice way to notify users if a report doesn't get send correctly with MAILSPLF.
/***********************************************************/
/* ATTEMPT TO SEND REPORT VIA MAILSPLF. IF ERRORS OCCUR, */
/* SEND A MESSAGE TO QSYSOPR. */
/***********************************************************/
MAILSPLF FILE(RPT100) JOB(*) +
TOADDRESS('[email protected]')
/* SEND ERROR MESSAGE IF MAILSPLF ERROR OCCURS */
MONMSG MSGID(CPF9898) EXEC(DO)
SNDMSG MSG('Error occurred while emailing report to +
email recipient') TOUSR(*SYSOPR)
ENDDO
Last Modified On:
No, open a new Support Case