Conditionally complete an application based on the completion code of one of its jobs
search cancel

Conditionally complete an application based on the completion code of one of its jobs

book

Article ID: 55522

calendar_today

Updated On:

Products

ESP Workload Automation

Issue/Introduction

How to conditionally complete an application based on the completion code returned by one of its jobs?

Resolution

If job A does not complete, its conditional success task CHECK.A will complete the application.  CHECK.A is a self-completing task.

If job A completes normally, it releases B, B releases C.  Task CHECK.A is bypassed due to the 'conditional' parameter.

Example:

  APPL DEMO
  JCLLIB 'DEMO.JCLLIB'
  CCCHK RC(1:4095) FAIL
  JOB A
    RUN ANY
    MEMBER A
    RELEASE (B,CHECK.A(A))
  ENDJOB
  JOB CHECK.A TASK CONDITIONAL
    RUN ANY
    ESPNOMSG AJ ALL APPL(%ESPAPPL..%ESPAPGEN) COMPLETE
  ENDJOB
  JOB B
    RUN ANY
    MEMBER B
    RELEASE C
  ENDJOB
  JOB C
    RUN ANY
    MEMBER C
  ENDJOB

The use of the ESPAPPL and ESPAPGEN symbolic variables is recommended over any other implementation.