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?
with V11.1 REGISTER_VARIABLE was introduced an easy possibility to pass OS Variables to Scriptvariables.
I do like this method very much.
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.
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.
Can you explain a bit more what you mean by "read [a file] at once via CALL Operator script" ?
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.
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!
You're welcome :-)