ESP Workload Automation

 View Only

  • 1.  Reldelay Override issue

    Posted Aug 19, 2024 08:56 AM

    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? 



  • 2.  RE: Reldelay Override issue
    Best Answer

    Broadcom Employee
    Posted Aug 30, 2024 09:10 AM

    Hi Vinothini,

    As you may already figured out, this behaviour is working as designed, see the comment in the doc link below:
    https://techdocs.broadcom.com/us/en/ca-mainframe-software/automation/ca-workload-automation-esp-edition/12-0/reference/commands/rerunm-command-rerun-multiple-jobs.html

    Usage Notes:

    ......
    When you rerun a job, ESP ignores time dependencies that are coded in the job definition, such as RELDELAY statements.
    ==========

    One possible alternative is to TRIGGER the event with ROOTJOBS option instead; and it will create new generations.

    Hope this helps,

    Lucy





  • 3.  RE: Reldelay Override issue

    Broadcom Employee
    Posted Aug 30, 2024 10:54 AM

    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
    ------------------------------