For example: If you need JOB B to release JOBs C and D (if JOB B completed with a RC=0) OR release JOBs E and F (if JOB B completed with a RC=1) you can do the following:
Insert a TASK (after JOB B) to loop through all JOB Bs on the CSF, using JOBONCSF, and check the return code of the last JOB B and bypass the correct SUBAPPL. Make sure you complete the task as well. Note: If there are a lot of jobs in CSF then REXX will look at EACH "B" listed to find out the correct generation.
APPL APPL1 JOB A RUN DAILY RELEASE B ENDJOB JOB B RUN DAILY RELEASE CHECK.RC ENDJOB JOB CHECK.RC TASK RUN DAILY REXXON J = JOBONCSF('B','X') DO I = 1 TO J IF XAPPLG.I = CLANGVAR('%ESPAPGEN') THEN DO IF XCONDCODE.I = 1 THEN DO "ESPNOMSG AJ JOBB_RC0 BYPASS APPL(%ESPAPPL..0)" "ESPNOMSG AJ CHECK.RC COMPLETE APPL(%ESPAPPL..0)" END ELSE DO "ESPNOMSG AJ JOBB_RC1 BYPASS APPL(%ESPAPPL..0)" "ESPNOMSG AJ CHECK.RC COMPLETE APPL(%ESPAPPL..0)" END END END REXXOFF RELEASE (C,E) ENDJOB JOB C SUBAPPL JOBB_RC0 RUN DAILY RELEASE (D) ENDJOB JOB D SUBAPPL JOBB_RC0 RUN DAILY ENDJOB JOB E SUBAPPL JOBB_RC1 RUN DAILY RELEASE (F) ENDJOB JOB F SUBAPPL JOBB_RC1 RUN DAILY ENDJOB
This Frequently Asked Question applies to all supported releases of ESP Workload Manager beginning with 5.3.