File transfer ENDED_NOT_OK with return code = 0 when the source file does not exist
search cancel

File transfer ENDED_NOT_OK with return code = 0 when the source file does not exist

book

Article ID: 90092

calendar_today

Updated On:

Products

CA Automic Workload Automation - Automation Engine

Issue/Introduction

File transfer ENDED_NOT_OK with return code = 0 when the source file does not exist

Environment

Release: AOATAM99000-9.0-Automic-One Automation Tools-Application Manager
Component:

Resolution

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