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

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