Symptoms
When you run a File transfer job with non-exist source file, the status for the job often said "ENDED_NOT_OK", with return code = 0
How to capture this error: "file does not exist" and send notification via Runtime tab
Cause
The return code = 0 with ENDED_NOT_OK status is normal behavior of UC4 system
Resolution
To capture the "file does not exist" error:
As the report job generated with message: the file ... does not exist", you will capture it and change the return code of the job to a number > 0, so that the alert will be sent to you
put these commands in the Post Process tab of file transfer to get alert when the file transfering does not exist
:SET &HND# = PREP_PROCESS_REPORT("JOBF",,"REP","*does not exist*")
:PROCESS &HND#
: SET &RET# = GET_PROCESS_LINE(&HND#)
: PRINT &RET#
: MODIFY_STATE RETCODE=50
:ENDPROCESS