ESP Workload Automation

 View Only
  • 1.  Enterprise Renewable Resources Questions

    Posted Apr 09, 2021 11:42 AM
    Hello, I have a question on using the Enterprise Renewable resources. I have several jobs set up to only run when my resource is available. This works fine for the first job but after the first job runs it sets the resource to "0" and the subsequent jobs won't run because the resource is set to "0". I have to go in and manually reset the resource to 1 after each job to keep the string of jobs moving. The end game to this is we have a group that wants to do deploy's to their server. Making the jobs dependent on resources would allow me to keep any jobs from running while they are deploying. I have self completing tasks set up to set the resource to "0" before they deploy and another to set it back to 1 after they are done. I just have the issue that each time a job runs it sets the resource to "0" and stops the string and I have to set it back to 1 for the next job. Can someone shed some light on what I maybe missing? Is there a way to keep the rest to "0" form happening after each job?

    NT_JOB OSMPAWE.SIT
    SUBAPPL POLICY
    RESOURCE (1,POLICYRES)   
    AGENT VMINAPS01

    oper resdef policyres list
    Resource POLICYRES Enterprise Renewable
    * * Max=0 Avail=1

    ------------------------------
    [Designation]
    Grange Insurance
    [City]
    ------------------------------


  • 2.  RE: Enterprise Renewable Resources Questions

    Posted Apr 09, 2021 01:29 PM

    RESDEF A                                 

    Resource A        Enterprise Renewable  

    *        *        Max=1 Avail=1         

     

     

    ESP PROC with 2 jobs:

     

    NT_JOB JOB1                                                      

      AGENT %AgentName                                                    

      RESOURCE (1,A)                                                     

      RUN ANYDAY                                                         

    ENDJOB                                                               

                                                                          

    NT_JOB JOB2                                                      

      AGENT %AgentName                                                   

      RESOURCE (1,A)                                                     

      RUN ANYDAY                                                         

    ENDJOB                                                               

                   

    Simulation:

    JOB TYPE-JOBNAME---HC-RELEASES 

    NTJob    JOB1       0 (NONE)   

    NTJob    JOB2       0 (NONE)       

     

    Trigger on Hold

    Job Name CCode Job Status                 

    JOB1         - APPLHOLD                   

    JOB2         - APPLHOLD                   

     

    Release Application Hold - JOB1 runs, JOB2 RESOURCE WAIT

    Job Name CCode Job Status                 

    JOB1         - Executing at <Agent Name>

    JOB2         - Waiting for Resources                      

          

    When JOB1 completes RESOURCE is automatically returned and JOB2 gets RESOURCE and runs

    Job Name CCode Job Status                 

    JOB1         0 COMPLETED AT 13.15 09 APR  

    JOB2         - Executing at <Agent Name>

     

     

    ESP Job Output:

    ESP6260I ResoMGR: Job JOB1 in Appl <APPL Name.Gen> Resources Satisfied

    ESP6260I ResoMGR: Job JOB2 in Appl <APPL Name.Gen> Resources Satisfied



    ------------------------------
    Senior Systems Analyst
    UPS
    United States
    ------------------------------



  • 3.  RE: Enterprise Renewable Resources Questions

    Broadcom Employee
    Posted Apr 09, 2021 01:45 PM

    Hi Keith,

    As you can see from Rick's example, the MAX value should 1, not 0.

    You can correct it and see if then it will work as expected.

    Lucy




  • 4.  RE: Enterprise Renewable Resources Questions

    Posted Apr 09, 2021 02:12 PM

    Hi Lucy,

     

    I did set the Max=1 but now it shows that I have two available. Does that mean that if I have more than 2 jobs ready to run that  they won't because there is only 2 available.? Don did a demonstration that he set up on his box where the Available was set to 1. He had multiple jobs running at the same time with a resource count of 1. Then he released his task to set it to "0" then simulated a deploy. Then when the simulation was done he released his task to set the resource back to 1. He said it was like open or closed. When the resource was set to 1 all the jobs could run and when it was set to "0" nothing would run. That is why I was surprised when my jobs were running and setting the resource to "0" . I have many jobs in my application that run at the same time but right now it is only running one job at a time because of the resource reset.

     

    Keith

     

    Resource POLICYRES Enterprise Renewable

    *        *        Max=1 Avail=2






  • 5.  RE: Enterprise Renewable Resources Questions

    Broadcom Employee
    Posted Apr 12, 2021 11:41 AM

    Hi Keith,

    Firstly for Don's presentation, it should be a THRESHOLD resource.

    Secondly I believe that when you issued the RESDEF command to set the MAX, there was an active JOB using this resource. It returned on resource after it completed, therefore the AVAIL became 2. You can issue this command to reduce one count:

    RESDEF POLICYRES SET DECREMENT (1)

    Following doc link has more details with examples on Resource:

    https://techdocs.broadcom.com/us/en/ca-mainframe-software/automation/ca-workload-automation-esp-edition/12-0/using/automate-resource-management.html

    Hope this helps,

    Lucy




  • 6.  RE: Enterprise Renewable Resources Questions

    Posted Apr 12, 2021 12:33 PM

    Hello Lucy,

     

    You were correct I should have made it a threshold resource. I completely overlooked that and I even watched Don's presentation 5 times trying to figure out what I missed and still didn't catch it. I changed the resource now to a threshold resource and will test but I am pretty certain it will work how Don showed me in the video now.

     

    Thanks again for helping me.

     

    Keith