Can you error check a DO_CMD in a ctmfw rules file?

All questions about Control-M jobs definitions
Post Reply
User avatar
jstarkw
Nouveau
Nouveau
Posts: 58
Joined: 14 Jan 2010 12:00

Can you error check a DO_CMD in a ctmfw rules file?

Post by jstarkw » 25 Jul 2012 9:29

Hello All,

I would like to execute a script from a DO_CMD in a ctmfw rules file. Is there a way to pass a success /failure code back the the ctmfw job so the job block will turn red (fail) if the script fails?

Best Regards

Klaus

Post by Klaus » 26 Jul 2012 10:38

If there is a crash in the commandfile,
you can look for the errorlevel.
To example:
if not errorlevel 0 goto error
.
.

and send a returncode
:error
"C:\Programme\BMC Software\CONTROL-M Agent\Default\EXE\_exit.exe" 5
exit


Regards
Klaus

Post Reply