AnsweredAssumed Answered

How to make Automic recognize a .net program with an unhandled exception as a failure

Question asked by GJG on Jul 31, 2018
Latest reply on Aug 6, 2018 by GJG

Hello,

 

My shop converted from CA ESP to CA Automic. 

 

I have a job set up to execute a ".net" program .

 

When running this job in ESP,

if the program completed successfully, it would send a return code 0 back to ESP.

If the program completed with an unhandled exception, no return code would be sent, but ESP would mark the job as failed. 

 

This was accomplished by adding ESP parameter EXITCODE to the job statement below https://docops.ca.com/ca-workload-automation-esp-edition/11-4/en/reference/statements/exitcode-statement-identify-success-or-failure-by-exit-code

NT_JOB EXEJOB.AWSMOPDM
    AGENT AEBPAS-BATCH01
    CMDNAME c:\mopconsole\Parallelconsole.exe
    ARGS PROD
   RUN WORKDAYS
   IF DAYS_FROM('NOV 4,2017') GE 0 AND DAYS_TO('DEC 20,2017') GE 0   THEN RUN SAT
   NORUN HOLIDAY
    EXITCODE 0 SUCCESS
   RELEASE (COP566D1.AWSMOPDM)
 ENDJOB

 

In Automic, I have a JOBS object set up to execute the .net program, but I'm having issues with making Automic fail the job if  the program ends with an unhandled exception. 

 

Any ideas on what I need to do to have Automic mark the job as failed when the program has an unhandled exception?

Outcomes