Automic Workload Automation

  • 1.  Better way to embed JOBS output in email body on v12+ ?

    Posted Jun 04, 2018 01:07 PM

    Hi all-

     

    Curious if there have been any improvements to capture JOBS output content and embed it directly into the body of an email. In the past, the typical compromise was to attach the Job report to an email, which is pretty painless (several forum posts here end with this as the solution). But this doesn't give complete control over what is displayed in the report (headers and footers are still there), it's just plain text, etc. It's just a nicer experience to be able to include job output directly in an email body.

     

    The PREP_PROCESS_REPORT function can be used to parse over report content, but passing all relevant rows over to a CALL object from the JOBS post-process has always been a lot of work. Is there any better way to do it once on v12?



  • 2.  Re: Better way to embed JOBS output in email body on v12+ ?
    Best Answer

    Posted Jun 04, 2018 02:46 PM

    Hi

     

    with V11.1 REGISTER_VARIABLE was introduced an easy possibility to pass OS Variables to Scriptvariables.

    Automic 

     

    I do like this method very much.

     

    cheers, Wolfgang



  • 3.  Re: Better way to embed JOBS output in email body on v12+ ?

    Posted Jun 05, 2018 09:53 AM

    Thanks for that Wolfgang, I remember hearing about this new functionality now that you've mentioned it. So the suggestion is to capture everything we would want displayed in an email body in a REGISTER_VARIABLE on the agent host side, and then reference in the CALL object later? That could potentially be easier than parsing through the Report content back on the AE side to format exactly what is required. I couldn't find a limit for a REGISTER_VARIABLE. Does one exist? If we wanted to include an HTML formatted table in an email body for example, the required number of characters could get relatively big.



  • 4.  Re: Better way to embed JOBS output in email body on v12+ ?

    Posted Jun 05, 2018 10:00 AM

    Hi

     

    I wouldnot be aware of a limit but honestly I did not use more that 5 register_variables at once.

     

    If you do have that heavy bunch of information I would tend writing it to a file with means of OS and read it at once via CALL Operator script.

     

    cheers, Wolfgang



  • 5.  Re: Better way to embed JOBS output in email body on v12+ ?

    Posted Jun 05, 2018 10:37 AM

    Hi Wolfgang-

     

    Can you explain a bit more what you mean by "read [a file] at once via CALL Operator script" ?



  • 6.  Re: Better way to embed JOBS output in email body on v12+ ?

    Posted Jun 05, 2018 11:09 AM

    Hi

     

    For example you are running a unix job that creates a kind of list with lets say 7 Columns.

     

    I would put the values into a file - e.g. echo Val1;Val2;Val3;Val4;Val5;Val6;Val7 >> /tmp/myfile.csv

    and repeat as often as data exists.

    then pass the filename to the CALL object

     

    in the CALL object you can do a PREP_PROCESS_FILE and read its content and use PUT_ATT_APPEND to add HTML code.

     

    if its easier with means of OS you can put the HTML code into the file and pass it 1:1 into the CALL object.

     

    cheers, Wolfgang



  • 7.  Re: Better way to embed JOBS output in email body on v12+ ?

    Posted Jun 05, 2018 12:15 PM

    Ah! I had forgotten about PREP_PROCESS_FILE. I will take this back and see how it may be applied to our scenario. Thanks for the suggestion Wolfgang!



  • 8.  Re: Better way to embed JOBS output in email body on v12+ ?

    Posted Jun 05, 2018 03:14 PM

    You're welcome :-)