BatchRunner Error Handling

Previous Next

See Also

When a job called using the RunJob method or using a job method fails, the error is displayed and the statement fails, just like any other INVOKE statement. For example, when the RunJob method is called from a SQL task, the SQL task stops when the Abort Mode attribute of the task has been set to Abort Task on Error, or Abort Job on Error.

You can modify this behavior using the RunJob ReturnStatus parameter to ensure that the BatchRunner statement does not fail. See "The RunJob Method" for more details. If the RunJob ReturnStatus parameter is set to yes, you can for example use the following statement in a decision:

SELECT    'Success'

WHERE     '<Result>Error</Result>' != BatchRunner.RunJob('J1' as jobname, 'true' "-quiet", 'Yes' "ReturnStatus")