Hi Vinothini,
As Lucy pointed out, this is how the RERUNM command works.
For ESP it is more natural to re-trigger the event at generate a new generation of the job. You can re-trigger the EVENT as a last step of your application for example. (and use the ROOTJOBS as suggested)
If for some reason you really need to keep yourself in single generation, a procedure like this may work for you:
Use can use AJ command in a task before the job to USE RESET keyword to set the time anew (even for initial run)
APPL DELAYSUB
JCLLIB 'jcllib'
JOB START TASK SELFCOMPLETING
ESP AJ JOB1 APPL(DELAYSUB.%ESPAPGEN) -
RESET DELAYSUB('REALNOW PLUS 1 MIN')
RELEASE JOB1
RUN ANY
ENDJOB
JOB JOB1
MEMBER WAITJOB
RUN ANY
RELEASE JOB2
ENDJOB
JOB JOB2
MEMBER WAITJOB
RUN ANY
ENDJOB
JOB HOLD TASK
RUN ANY
ENDJOB
You can use RERUNM command from page mode to try it out, you should see that JOB1 will be again set to wait based on the command issued by the task before it.
RERUNM APPLICATION(DELAYSUB.0) ROOTJOBS(START+)
------------------------------
Jonáš Dusil
Product Owner | ESP Workload Automation | Mainframe Software Division
------------------------------
Original Message:
Sent: Aug 16, 2024 11:33 AM
From: vinothini G
Subject: Reldelay Override issue
Hi Team,
Could you please help in this..!
I am using,
JOB1 after it's run, delays 30minutes and then submits JOB2
JOB2 Runs
DELAYJOB delays 10 minutes
RETRIG_JOB retrigger from JOB1
and this pattern continues until 22:00
Using APPL Event trigger at 8:00 --> APPL also having standalone other jobs
JOB1
Reldelay 30 minutes
release JOB2
JOB2
Release(DELAYJOB)
DELAYJOB task self completing
ESPCMDNM AJ RETRIG_JOB RESET DELAYSUB('REALNOW PLUS 1O MIN')
Release(RETRIG_JOB)
RETRIG_JOB self completing --> job stops retriggering at 22:00
abandon sub 22:00
RERUN ROOTJOB(JOB1+) --> Retriggering from JOB1 with downstream jobs)
Self-completing appl --> To force complete all failed instance before start of next event
At 7:55
i am using above steps.. but very 1st run of event trigger JOB1 releases JOB2 after 30 minutes. but in subsequent runs JOB1 releases JOB2 immediately without delaying 30 minutes.
May I know why this Reldelay overrides in this scenario?