ESP Workload Automation

  • 1.  Keeping appls from running together

    Posted May 05, 2015 12:07 PM

    Hi All,

    What is the best way to keep appls from running together? We currently use WAIT to keep the same appl names from running together. I would like to keep other appls from running when certain appls are running. Can I use a resource on the appl level? I cannot find any documentation to support this.

    Thanks!

    Sherri

     

    (This is an ESP question)

     

    Message was edited by: SHERRI DOERFLEIN



  • 2.  Re: Keeping appls from running together

    Posted May 05, 2015 12:09 PM

    is this autosys(AE) / DE / ESP?



  • 3.  Re: Keeping appls from running together

    Posted May 05, 2015 12:21 PM


    I put it under the category of CA Workload Automation ESP Edition...I guess that's not showing? Anyway...ESP



  • 4.  Re: Keeping appls from running together

    Posted May 05, 2015 12:26 PM

    ok you have to click on the whole thing. the summary view tells nothing. you would think it would show up top. :-( instead of a light grey at bottom ;-)

    Thanx sherri..

    Good luck..

     

    In autosys you can use workload balancing with machines or global variables. I would assume you could use resources etc. to do similar in ESP.



  • 5.  Re: Keeping appls from running together

    Posted May 05, 2015 12:39 PM

    RESOURCES, NOTWITH Statement and APPL_GEN could be used it depends on many things in your environment. Your preferred method of APPL/JOB setup.

     

    RESOURCES can be used for multiple jobs in an Application.  The following is from the Command Reference Guide.

     

    Specifying resources for single jobs and multiple jobs
    To specify resource information for a job in an application, add a RESOURCE statement between the JOB and ENDJOB statements. The RESOURCE statement affects only that job.
    To specify resource information for a group of jobs within an application definition, add a RESOURCE statement immediately before the JOB statement of the first job in the group. This RESOURCE statement affects all subsequent jobs in the application. If there are other jobs after the last job in your group, code another RESOURCE statement immediately after the ENDJOB statement of the last job in your group.

     

    Do you want them to have APPl2 wait until APPL1 completes before running?  (RESOURCE / NOTWITH)

     

    Or do you want APPL2 to skip a run if APP1 is running?

     

    APPL_GEN

     

    IF ESP_APPL_GEN=1 THEN DO                        
       IF NOT COMPLETED('APPL1','ALL') THEN EXIT  
    ENDDO                                            
                                                     
    APPL APPL2



  • 6.  Re: Keeping appls from running together

    Posted May 06, 2015 05:16 PM

    Actually it is documented how to have it so that two appls cannot execute at the same time --- but it is not easy to find. The procedure is documented in the ESP Users Guide in the chapter on Resources in the section "Examples of Resource Usage" at the very end in a section called "Controlling Mutually Exclusive Groups of Jobs".  The section begins with the sentence below.

     

    ================================================================================================

    In this example, CA WA ESP Edition controls resources such that one group of jobs does not execute while another group is running. You can use the technique illustrated here even if both groups of jobs are in different applications.

    ================================================================================================

     

    The example that they give shows how you use a depletable resource to keep two groups of jobs from executing at the same time within a particular application but you can extend the technique to keep two groups of jobs from executing at the same time within two (or more) different applications.  The technique is that you define a depletable resource with a max count of 1 to represent the serializing resource and ask for 1 unit of that resource in a self completing task at the top of each appl which releases the stem jobs (jobs that would in the absence of the self completing task have a hold count of zero) in the appl.  And then have the appl utilize another selfcompleting task reset the count of the serializing resource back to 1 at the end of each appl. The idea is that once the appl decrements the serializing depletable to zero then no one else can get that serializing resource until someone else sets the resource count for the serializing resource back to 1 at the end of that appl.  The example I refer to in the Users Guide can be improved by adding a DUEOUT and a NOTIFY OVERDUE statement within the initial self completing task to give a notification if it waits too long to get control of the serializing resource which would be a warning that the last user of the serializing resource has encountered a problem that they have not yet addressed. 

     

    Michael E. Ellis

    Deere & Company

    Systems Programmer



  • 7.  Re: Keeping appls from running together

    Posted May 07, 2015 09:28 AM

    Thanks Michael,

    What you outlined is what we are doing today. The problem that we have run into is if the appl is terminated, the resource does not get reset. I was hoping for a way to put the resource on the appl itself so that once the appl was terminated, it would release the resource (rather than set/reset) Wishful thinking!

    Sherri



  • 8.  Re: Keeping appls from running together

    Posted May 07, 2015 09:41 AM

    thats odd. maybe you can have a job trigger on the failure.. and release the resource?

    or have a process poll and do it that way ?



  • 9.  Re: Keeping appls from running together

    Posted May 07, 2015 10:10 AM

    Not really odd because the reset is not being done when the appl is terminated. (Reset being different from release. Different types of resources.)

    But, as you stated, triggering a reset job if the appl is terminated may be the only way to get around this.



  • 10.  Re: Keeping appls from running together

    Posted May 07, 2015 10:30 AM

    there's always A way. until "the" way is created ;-)