Setting up an application to trigger one job if file is avail or another if file is not available in CA Workload Automation ESP Edition.
search cancel

Setting up an application to trigger one job if file is avail or another if file is not available in CA Workload Automation ESP Edition.

book

Article ID: 9908

calendar_today

Updated On:

Products

ESP Workload Automation

Issue/Introduction

Setting up an application to trigger one job if file is avail or another if file is not available



Working with an application that is retrieving a file. The job is set up on the mainframe but it using ConnectDirect to collect the files. The job is running and returning a RC 0 regardless because we are getting it on the submitted status instead of completion. We created 2 other jobs; one for completing with RC 0 if the file is there and one with RC 8 when the file is not there.
We set up a condition on the appl but conditional doesn't pull any bad return code it just get bypass if the file is not there. We are not getting the bad return code and we need the process to fail if there is no file.  Is there an easier way to do this?
This is how the appl is set up right now

JOB #NDMTEST
MEMBER #NDMTEST
CCCHK RC(0:7) OK CONTINUE
RELEASE (#CDGOOD, #CDBAD(A))
RUN DAILY
ENDJOB

JOB #CDGOOD
MEMBER #CDGOOD
CCCHK RC(1:4095) FAIL CONTINUE
RUN DAILY
ENDJOB

JOB #CDBAD CONDITIONAL
MEMBER #CDBAD
CCCHK RC(8) FAIL CONTINUE
RUN DAILY
ENDJOB

Environment

Release: ENCWLA00200-11.4-Workload Automation-Restart Option-EE
Component:

Resolution

The connect direct job needs to return the proper condition code to ESP when it fails. ESP reacts on conditions and if none is passed it will consider job successful. Add the DMBATCH step to the JCL and ESP reported the failure on every step we tested.