ALERT: Some images may not load properly within the Knowledge Base Article. If you see a broken image, please right-click and select 'Open image in a new tab'. We apologize for this inconvenience.

Windows Job ending with 'ENDED_OK' when job should have failed

book

Article ID: 200673

calendar_today

Updated On:

Products

CA Automic Workload Automation - Automation Engine

Issue/Introduction

Windows Job ending with 'ENDED_OK' when job should have failed

Resolution

By default a windows job has the following in the process tab:
! insert these lines in your script to determine if an error occurred
!
! @set retcode=%errorlevel%
! @if NOT %ERRORLEVEL% == 0 goto :retcode

These lines must be uncommented and the job JCL added before. For example:


! insert these lines in your script to determine if an error occurred
<job scripting here>
@set retcode=%errorlevel%
@if NOT %ERRORLEVEL% == 0 goto :retcode

Attachments