Windows Job ending with 'ENDED_OK' when job should have failed
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