ESP Workload Automation

  • 1.  CA ESP - Generate appl only if prior generation jobs are all successful or failed

    Posted Jan 16, 2015 01:01 PM

    I'm trying to figure out a code snippet (REXX, CLANG, etc) that will allow an application to meet the following requirements:

     

    If any of the jobs in that prior generation are waiting, on hold, executing, whatever (any state except complete or fail), the next generation will either not generate or will complete itself immediately (not run anything).  So long as every job has attempted to run at least once in that prior generation, pass or fail, the new generation will start.  We want the old generation to remain in the current state, visible in the director, until it can be examined by production support.  However we don't want a new generation running if there are any jobs left in the prior generation that haven't attempted a run or are actively running.

     

    I've tried a couple different things, but I'm unaware of how to check the status of all jobs in an appl in such a way that would meet the above requirement.  Any suggestions?



  • 2.  Re: CA ESP - Generate appl only if prior generation jobs are all successful or failed

    Posted Jan 20, 2015 11:28 AM

    This should do what you need.

     

    Replace <Application Name> with a valid value for your environment.

     

    APPL = '<Application Name>'                                            


    IF ESP_APPL_GEN=1 THEN IF NOT COMPLETED('%APPL','ALL') THEN EXIT

     

    APPL %APPL                               



  • 3.  Re: CA ESP - Generate appl only if prior generation jobs are all successful or failed

    Posted May 18, 2015 03:02 PM

    This is actually a very post update, but I felt it important to respond in case anyone comes looking for an answer to a situation similar to mine.

     

    I'm sorry, but the code above actually doesn't answer the situation I outlined.  If a generation is sitting out in failed status, the code above will prevent a new generation from running, contrary to a condition I outlined in my original post.  The requirement was that each job had to have attempted to run at least once.

     

    This code also has additional fallout I didn't expect.  The code above will prevent an event from simulating properly if a generation currently exists in non-complete status, as ESP does not seem to have the simple capacity for determining if it is a simulation or not.  At least the CA reps I spoke to were unaware of a method.  We have a process that relies on simulating events to gather data for a job database, which this piece of code completely prevents for the appls it is used in.  We have switched back to REXX coding as it appears that is not evaluated, and thus the simulation won't exit.  We have multiple appls which will always have a current generation, retriggering themselves after a file monitor detects a job.

     

    In regards to the situation I described, that was a theoretical, an application team was attempting to emulate functionality that Autosys possesses that ESP does not, due to Autosys being simply manipulable by simple scripts.  We've decided to just work around it as ESP really is not capable of easily handling that functionality.

     

    I appreciate the effort, thank you for your time, Rick.