Hi dennis.naranjo,
Here is CLANG from our proc. I don't have any of the code from the scripts involved:
TEMPLATE DSNP270_HOURLY (1,OFFSET)
UNIX_JOB ZN470X02.%OFFSET
EXITCODE 0 SUCCESS
EXITCODE 99 SUCCESS
RUN WORKDAYS
NORUN TNSTATEHOLIDAY
DELAYSUB 06:00 PLUS %OFFSET HOURS
AGENT <agent>
USER <user>
SCRIPTNAME <script>
ENVAR JOBNAME=%ESPAPJOB
RELEASE ADD(BYPASS_DSNP270) COND(RC(99))
RELEASE ADD(ZN470Y01.%OFFSET) COND(RC(0))
ENDJOB
UNIX_JOB ZN470Y01.%OFFSET
RUN WORKDAYS
NORUN TNSTATEHOLIDAY
AGENT <agent>
USER <user>
SCRIPTNAME <user>
ARGS %USER1
ENVAR JOBNAME=%ESPAPJOB
ENDJOB
JOB BYPASS_DSNP270 LINK PROCESS
RUN WORKDAYS
NORUN TNSTATEHOLIDAY
ESPNOMSG AJ ZN470Y01.%OFFSET BYPASS APPL(%ESPAPPL..%ESPAPGEN)
ENDJOB
ENDTEMPL
DSNP270_HOURLY 0
DSNP270_HOURLY 1
DSNP270_HOURLY 2
DSNP270_HOURLY 3
DSNP270_HOURLY 4
DSNP270_HOURLY 5
DSNP270_HOURLY 6
DSNP270_HOURLY 7
DSNP270_HOURLY 8
DSNP270_HOURLY 9
DSNP270_HOURLY 10
DSNP270_HOURLY 11
DSNP270_HOURLY 12
DSNP270_HOURLY 13
DSNP270_HOURLY 14
Explanation: If ZN470X02 ends with a return code of 99, then it releases a task (BYPASS_DSNP270) which bypasses ZN470Y01. This process uses a template that ensure this occurs every hour for 15 hours. You can make this more complex by using AFTER ADD statements to add other jobs to the stream.
Hope this helps!