Update the STEPS panel of the failing job with the following statements:
On Stmt=* Code=COMPSTAT!0 (or NOTOK or other specific return codes)
DO Set-Var %%\G_ORDERID %%ORDERID
DO Set-Var %%\G_JOBNAME %%JOBNAME
DO Set-Var %%\G_MAILADDRESS youremail@domain.com
Do Force-Job Table=YourTable Jname=EMAILSYSOUT
Note: The “Do Set-Var” is setting global variables to be passed to another job. Global variables are defined using a backslash.
Force job definition: Job name EMAILSYSOUT
On the command line:
ctmpsm -LISTSYSOUT 000%%G_ORDERID |mailx -s "Job %%G_JOBNAME failed. See sysout attached!" %%G_MAILADDRESS
Note: The Node-id on the Execute tab must be the home server for Control-M.
0 comments:
Post a Comment