1

I have a Control-M job that calls a python script. The python script contains a function that returns True or False.

Is it possible to make the job to fail when the function returns False?

I have to use a shell scrip for this? If yes how should i create it?

Thank you

FlorentinaP
  • 83
  • 3
  • 12

2 Answers2

0

Return a non-zero value -- i.e. call sys.exit(1) when function returns False, and sys.exit(0) otherwise.

sendmoreinfo
  • 582
  • 6
  • 22
0

An alternative, quicker GUI implementation (without having to change the code at all) in the "Actions" tab, you can add an "on-do"

On specific statement output: 
Statement: *
Code: *False*
Do: Set to NOT OK

Just keep in mind if you do change your python code, you'd have to change this job as well.

Patrick Collins
  • 5,621
  • 3
  • 26
  • 64