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                                                      
Still have questions? We can help. Submit a case to technical support

Last Modified On:
You don't have the appropriate permissions.
No, open a new Support Case