There are two applications. One application will run every 30 mins from 9 AM until 4 PM. When another daily application starts it should complete before 2 jobs in the cyclical application should run again.
Need to stop the 2 jobs and start them again after the daily application completes.
Release : 12.0
Component : ESP WORKLOAD AUTOMATION
1. Create a Global Variable Table called TESTGVT
VTLIST TESTGVT
Global Variable Table TESTGVT
Created at 10.52.07 on TUESDAY MAY 1ST, 2023 by username
Currently 1 variable, 0 triggers
Table size 520, 152 bytes imbedded free space
STATUS='AVAIL'
2. Get the variable during the PROCESS phase of the application, and trigger the application
IF ESP_APPL_PROC=1 THEN
VGET (STATUS) TABLE(TESTGVT)
JOB MYJOB.%ESPATIME
IF %STATUS = 'UNAVAIL' THEN DO
NORUN DAILY
ELSE DO
RUN DAILY
ENDDO
RELEASE MYJOBX
SE '%STATUS' U(username)
ENDJOB
JOB MYJOBX
RUN DAILY
RELEASE MYJOBXX
ENDJOB
JOB MYJOBXX
RUN DAILY
RELEASE MYJOBXXX
ENDJOB
JOB MYJOBXXX
RUN DAILY
ENDJOB
3. Create an application with the TASK processes that will set the variable UNAVAIL and AVAIL.
While job MYJOBY is running, the variable status is set to UNAVAIL.
APPL TESTRUNF HOLD
JCLLIB 'MY.JCLLIB'
COPYJCL 'MY.COPYJCL'
TEMPLIB 'MY.TEMPLIB'
OPTIONS RESTARTSTEP
JOB SETVAR.UNAVAIL SELFCOMPLETING TASK PROCESS
RUN DAILY
VGET (STATUS) TABLE(TESTGVT) CLANG
VSET STATUS UNAVAIL TABLE(TESTGVT)
RELEASE MYJOBXX
ENDJOB
JOB MYJOBY
RUN DAILY
RELEASE SETVAR.AVAIL
ENDJOB
JOB SETVAR.AVAIL SELFCOMPLETING TASK PROCESS
RUN DAILY
VGET (STATUS) TABLE(TESTGVT) CLANG
VSET STATUS AVAIL TABLE(TESTGVT)
ENDJOB