Exit Code from the Program

SKS (3 posts)
July 22, 2010 02:58 PM
Accepted Answer

Hello ,

We are using adTempus 3.0.7.3.  I am trying to write a script to capture the exit code or return code from the program.  I am writing the script in C#.  I was searching for the exit code and found out Environment.ExitCode.ToString() .  But this seems to be not the correct one.  When I tried to print it in logs using "adTempus.LogMessage (MessageTypeEnum.Informational, 0, Environment.ExitCode.ToString());" it is displaying ZERO always.  I wanted to know what is the correct variable used for the exit code or return code from the program that I could use it in the scripts.

Your immediate response is greatly appreciated.

Thanks,

SKS

This topic has an accepted answer. Jump to it.
J.D. Staff (46 posts)
July 23, 2010 07:41 AM
Accepted Answer

I assume you are looking for the exit code from the program that is being run by your job?

This is available through an adTempus Job Variable named "ProcessExitCode". You can retrieve it using

adTempus.JobVariables["ProcessExitCode"]

 

SKS (3 posts)
July 23, 2010 08:10 AM
Accepted Answer

Thank you for the prompt reply.

 

Thanks,

SKS

SKS (3 posts)
September 13, 2010 01:50 PM
Accepted Answer

Hello,

This one doesn't run in Product Version: 2.1.0.0.  but runs in 3.0 version.  Please advise.

adTempus.JobVariables["ProcessExitCode"] . How to get the exit code in 2.0 versions.

Thanks,

J.D. Staff (46 posts)
September 14, 2010 08:27 AM
Accepted Answer
Version 2.1 does not support C# scripts. In VBScript you can get the exit code using
Parameters("ADTTaskResult")

 

Replies are disabled for this topic.