Hi Bill,
I had thought that using the ‘SD_ACMD ExitCodeMsg’ command would set the status, but apparently it only works if the job status is set to failed. If the exit code is interpreted (using $#ec:) as successful, the message set in the command is ignored.
I suggest you create an IDEA to have an EXPLICITLY SET Exit Code message always appear in the status message field, even if the job is successful. Perhaps they could add a parameter to the ExitCodeMsg command: 1 to always display the message, 0 (default) to display only on job failure. When I see the idea I will vote for it.
Alternately, create the idea to suggest a parameter on the JOB to output the non-zero return code in the status message field even when the job is successful. That way you wouldn’t have to explicitly call sd_acmd within your job. I will vote for it either way.
Steve McCormick, ITIL
CA Technologies
Principal Services Consultant
Stephen.McCormick@ca.com
<mailto:Stephen.McCormick@ca.com>