Adding contents of a file to the Body of DO MAIL
Adding contents of a file to the Body of DO MAIL
Is it possible to put he contents of a short log file into the body of a DOMAIL? The recipient does not want an attachment. Log file is generated on a linux server. I am using versiob 6.4 for windows with msql2005.
I don't know how you can do that dorectly from CONTROL-M (it is not possible, I think), but you can do that using reporting tools utilities together with CONTROL-M. For example, look for ChristianSteven Software and their tools for automate reports distributing. Their tools can do exactly what you want. Also, you can use CSS from command line prompt, so, no problem with integrating CSS reporting scheduling into CONTROL-M workflow. That way you can do exactly what you want.
- nicolas_mulot
- Nouveau
- Posts: 149
- Joined: 07 Jan 2010 12:00
jstarkw,
What kind of log are you talking about?
Since 6.4.0, you can attach the sysout of the job to a mail.
You can as well process the controlm job log (CMR_IOALOG) by an SQL request runnable as part of a %%POSTCMD, in which case the result of the request will be part of the job's sysout.
I can provide additional guidelines if this could address your need
Cheers
Nicolas Mulot
What kind of log are you talking about?
Since 6.4.0, you can attach the sysout of the job to a mail.
You can as well process the controlm job log (CMR_IOALOG) by an SQL request runnable as part of a %%POSTCMD, in which case the result of the request will be part of the job's sysout.
I can provide additional guidelines if this could address your need
Cheers
Nicolas Mulot
As Nicolas said, you can only attach job's SYSOUT using DO MAIL.
If you need to send a different log file (not sysout) generated inside the job, the easiest way is using Linux OS tools:
cat $LOGFILE | mailx -s "Job XX log" email@xxxxx.com
regards
martin
If you need to send a different log file (not sysout) generated inside the job, the easiest way is using Linux OS tools:
cat $LOGFILE | mailx -s "Job XX log" email@xxxxx.com
regards
martin
Thanks all for the replies. I am currently running into the problem that mail originating from this server is getting rejected as spam because the return address defaults to the user@server domain. I know this can be changed in sendmail configuration file but I am not a linux expert nor do I have the required permissions on the server to make the change. The process to get this changed has been dreadfully slow and I was looking for an alternative way of sending the log contents. The log is a very small test file less than 3kb. My customer did not like receiving it as an attachment.
Another question: Can a text string be saved as an auto edit variable? I tried but was getting errors.
ctmvar -ACTION SET -VAR "%%\group\new_var" -VAREXPR "`cat log`"
ctmvar: symbol lookup error: ctmvar: undefined symbol: AG_UTIL_main_dynamic
Another question: Can a text string be saved as an auto edit variable? I tried but was getting errors.
ctmvar -ACTION SET -VAR "%%\group\new_var" -VAREXPR "`cat log`"
ctmvar: symbol lookup error: ctmvar: undefined symbol: AG_UTIL_main_dynamic