I’d like to write a JOBS object so that it performs some post processing steps even if the job could not be started, e.g., due to an invalid agent or login. Is there a way to do this? The :ON_ERROR RESUME statement does not help.
Would this be a solution?
: SET &HUGO# = "RUN"^
:IF &HUGO# = "RUN"echo "Hugo: &HUGO#"@set retcode=%errorlevel%@if NOT %ERRORLEVEL% == 0 goto :retcodedir@set retcode=%errorlevel%@if NOT %ERRORLEVEL% == 0 goto :retcode:ENDIF
:IF &PreProc_Error# <> "": INC_SCRIPT(2): EXIT 0 :ENDIF
U00020411 The command 'EXIT 0000000000' in 'UC4.RESOLVE_AGENT_GROUP.JOBI', line '00048' stopped the generation of this task.
U00011113 Task with RunID '0002957013' will be re-started as soon as host '<UNIX>' is active again or the previous error has been corrected.
:IF &PreProc_Error# <> "": INC_SCRIPT(2): STOP NOMSG:ENDIF