HI Team,
I running below script from controlM and job is reporting as failure everyday so i tried to change the if exitstatus=1 (send only email) but not to end as a job is failed. can you let me know where i have to change this script to make the script not to fail but instead send email and complete successfully
&& write_log "read complete and matched for ${YEAR}-${MONTH}-${DAY}" \
&& EXITSTATUS=0; } ;} \
|| { write_error "Failed read incomplete and is not matching with ${JOBFILE}" \
&& EXITSTATUS=1; }; }
return ${EXITSTATUS}
}
#
# Main
#
EXITSTATUS=1
[ $# -ne 7 ] && [ $# -ne 6 ] && usage && exit ${EXITSTATUS}
dfs fs -ls -d ${CLOUDDIR} > /dev/null 2>&1 || { write_error "${CLOUDDIR} does not exist. Exiting now!!!!" && exit ${EXITSTATUS}; }
dfs fs -ls ${JOBFILE} > /dev/null 2>&1 || { write_error "${JOBFILE} does not exist. Exiting now!!!!" && exit ${EXITSTATUS}; }
create_log_dir && create_log_files && read_check && EXITSTATUS=0
[ ${EXITSTATUS} -ne 0 ] && notify_error "!!!${ENVIRONMENT}: Validating ${SRCSYSTEMTYPE} files for job ${STATUS} failed!!!" ${LOG} ${ERROR}
exit ${EXITSTATUS}