Automic Workload Automation

 View Only
  • 1.  Send job report in email

    Posted Jul 18, 2022 04:00 AM
    I'm trying to run a simple post process script to output the contents of a job's report into an email, but it sends each line in a separate email. There are approximately 30 lines in the job report, which is a directory listing. 

    Does anyone know how to correct this? 




  • 2.  RE: Send job report in email

    Posted Jul 19, 2022 01:32 AM
    Hi Michele,

    this is "works as designed" because for every iteration you're running SEND_MAIL - line by line.

    IMHO the easiest solution is to use a CALL object to attach the entire report instead of the PREP_PROCESS sequence. If you need to keep the filter then use PREP_PROCESS and create a new output file (WRITE_PROCESS) and finally send the file.

    regards,
    Peter



    ------------------------------
    For AUTOMIC trainings please check https://www.qskills.de/qs/workshops/automic/
    ------------------------------



  • 3.  RE: Send job report in email

    Posted Jul 25, 2022 06:15 AM
    There's so much going on in this job's workflow - post conditions, post processing, etc. - that a call object attaches multiple reports, when all I really need is just the XXX.REP.txt.





  • 4.  RE: Send job report in email

    Posted Jul 26, 2022 07:05 AM
    Michele, in that case, you can use your script, just move the SEND_MAIL to after the loop.  During the loop you will need to concatenate each of the lines using STR_CAT. 

    Note: I'm not positive but you may also have to add a CRLF to the end of each line using the script function UC_CRLF() which can be assigned to a variable.


  • 5.  RE: Send job report in email

    Posted Aug 09, 2022 07:52 AM


    hello
    I agree with Pete , an object call is perfect:

    jobs -> call object with the log

    jobs : :PSET &JOB_RUNID# = &$RUNID#

    call object:



    Marc Broussard