ESP Workload Automation

 View Only
  • 1.  Using Resource and STEPEND to trigger a job after a specific step?

    Posted May 21, 2019 02:17 PM

    I am testing and trying to get Job B to run after job A gets to step "FTPYTD". I have followed several examples with out success. Right now I can submit both jobs and Job A will run while JOB B sits on a resource wait. After step "FTPYTD" completes the resource should be available but Job B does not begin execution and still sits in "Resource Wait". It is like JOB B doesn't recognize that the resource is now available. Any help would be appreciated. Also I notice that the STEPEND application seems to be executing after ever step in JOB A INSTEAD OF JUST AFTER THE "FTPYTD" step.

     

    JOB A                                     
      /* STEPEND STEPNAME(FTPYTD) RELRES (1,MDL615W)
      MONITOR SPRODID                              
      DATASET 'P723.MDL.JCLLIB'                    
      RUN CLOSEOUT                                 
      AFTER ADD(MDL612)                            
    ENDJOB                                         
                                                   
    NT_JOB B                             
       AGENT HQDWAPM05                             
       USER GMCC\ESPADMINNONPRD                    
       CMDNAME "D:\CYB_JOBS\OSMMCOM1.BAT"                    
       MONITOR SPRODID                             
       RESOURCE (1,MDL615W)                        
       RUN CLOSEOUT                                
       EXITCODE 0 SUCCESS                          
    ENDJOB 

     

       resdef - list     

    Resource MDL615W  Local Depletable
    WHQ      WHQ      Avail=0     

     

    STEPEND Event   
    /*************************************************/      
    /* DEFINED BY GOPKXG   AT 14.09 ON MON 20MAY2019 */      
    /*            LAST RUN AT 10.45 ON TUE 21MAY2019 */      
    /*************************************************/      
    EVENT ID(SPRODID.MDL615W_STEPEND)  SYSTEM(MASTER)  REPLACE
    INVOKE 'CAI.ESPWA.PROCS(STEPEND)'   

     

    STEPEND Application

    IF %MNJOB = 'MDL615W' AND %MNSTEP = 'FTPYTD' +
      THEN +                                      
       DO                                         
       RES = 'MDL615W'                            
       JUMPTO SETRES                              
       ENDDO                                      
       ELSE                                       
        DO                                                                                                                                     
    ENDDO  

     

    SETRES:                                
    JOB %RES..SETRES LINK PROCESS          
      ESPNOMSG OPER RESDEF %RES SET AVAIL(1)
      RUN ANY                              
    ENDJOB                                                                         

     

    PARMLIB

    NODE WHQ ADD                                
    CPU WHQ ADD NODE(WHQ) CURRENT               
    RESDEF MDL615W ADD LOCAL DEPLETABLE AVAIL(0)



  • 2.  Re: Using Resource and STEPEND to trigger a job after a specific step?

    Broadcom Employee
    Posted May 21, 2019 03:30 PM

    Hi Keith,

     

    You should use RENEWABLE resource instead. DEPLETABLE resource can't be released.

     

    Hope it helps,

     

    Lucy



  • 3.  Re: Using Resource and STEPEND to trigger a job after a specific step?

    Posted May 22, 2019 11:52 AM

    Hi Lucy,

     

    Thanks for the help. I did change the Resource to Renewable and tried to test but I am still having the same issue. Job B just sits there on a resource wait even though Job A has completed the "FTPYTD" step. I verified  that the Resource was defined correctly and the JOB B is indeed waiting on the correct resource but for some reason it just will not begin execution when the resource becomes available.

     

    Thanks,

     

    Keith

     

    LR_ OSMMCOM1

                                                                     
           Qty Name                                         Available?
                                                                     
    L        1 MDL615W                                          Y    

     

    Resource MDL615W List Own Wait  
    Resource MDL615W  Local Renewable
    WHQ      WHQ      Max=1 Avail=1 



  • 4.  Re: Using Resource and STEPEND to trigger a job after a specific step?

    Broadcom Employee
    Posted May 22, 2019 02:59 PM

    Hi Keith,

     

    It doesn't seem right. How can the JOB wait on the resource which it's already available?!

     

    I suggest that you open a support ticket, and we will look thru everything with you.

     

    Thank you for your understanding,

     

    Lucy