CA Client Automation

 View Only
  • 1.  Job Return Code Status Message

    Posted Mar 02, 2018 09:53 AM

    For software delivery jobs, I use the $#EC parameters to designate non-zero success.

     

    How can we show the exit code in the 'status message' field within the job container?  It will show the error exit codes, but I am interested in showing the non-zero success exit codes.



  • 2.  Re: Job Return Code Status Message
    Best Answer

    Posted Mar 02, 2018 10:52 AM

    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>