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

Document ID : KB000055522
Last Modified Date : 14/02/2018
Show Technical Document Details

If job A doesn't complete correctly its conditional success task CHECK.A, a self completing task, will the complete the entire application.

Otherwise, upon normal completion of job A, job A releases B then B releases C. Task CHECK.A is bypassed due to the 'conditional' parameter.

  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 as shown above is recommended over any other implementation.

This Frequently Asked Question applies to all supported releases of ESP Workload Manager.