Automic Workload Automation

 View Only
  • 1.  send_mail query

    Posted Oct 20, 2020 01:57 PM
    Hi Experts,

    We are using the send mail script in the post process tab of our jobs to send out failure notification.

    :SET &ret# = SEND_MAIL(&to#, &cc#, &subject#, &message#)

    However when we check the job report we dont see a post process tab report. So in case the job fails and notification is not received then how can we troubleshoot?
    For example we can check the job report of a Call Notification and also check its executions but nothing like that here.


    ------------------------------
    Thanks,
    Kumar
    ------------------------------


  • 2.  RE: send_mail query
    Best Answer

    Posted Oct 20, 2020 02:51 PM
    You will not get a post-process report unless the post-process script generates output.
    You could do something like this to always generate a post-process report;

    !POST PROCESS ERROR HANDLING
    :set &MyRC# = get_statistic_detail(,RETURN_CODE)
    :if &MyRC# = 0
    : print "Good end of job"
    :else
    : print "Job failure invoked. RC=&MyRC#"
    : Do error event here
    :endif



    ------------------------------
    Pete Wirfs
    SAIF Corporation
    Salem Oregon USA
    ------------------------------