ESP Workload Automation

 View Only
  • 1.  How to identify the environment that my APPL is running ?

    Posted Jun 05, 2017 12:26 PM

    Hi Everyone,

     

    We have our Dev, SIT and UAT environments setup on same ESP master and jobs are scheduled to run from their own event prefix for each environment (example: SANDEV, SANSIT, SANUAT). 

     

    We have created our applications, so:

    1. A new generation of same event will not be created when one is with NOT COMPLETED state in ESP by checking the event prefix.
    2. If the event was triggered from a different prefix, generation will be created and executed.

     

    We are good when we trigger the jobs from either TSO or workstation. 

     

    We have implemented a web application to allow the users to trigger the event and before that we have enabeld the option to see the last run status

     

    1. We run LAP command for application to see/print the status of the application.
    2. If the application is showing Processing/Trouble - we are not allowing the users to trigger the event from web app.

    Since we have all our non-prod environments on same master and we are checking the LAP on application, if there is one active appl from one environment, Trigger button for other environments are disabled in our web app.

     

     

    I have an idea of using LAP with ALL option where it displays the event prefix for environment check but the code changes become complex. Is there any other suggestion ?



  • 2.  Re: How to identify the environment that my APPL is running ?

    Broadcom Employee
    Posted Jun 05, 2017 04:09 PM

    Hello Santhosh,

     

    Firstly I would suggest that you use different APPL name for the different event prefix. This means every event prefix for same event name will have its own application generation counting. For example, add DEV, SIT or UAT to the application name.

     

    Secondly you may use COMPLETED function to make it simpler. With above, this function can check if there is any incomplete generations for same application.

     

    For example, you can add below to the ESP proc when event prefix is SANDEV, and then if any generation for APPL TESTDEV is active, it will quit and no new generation will be created:

    IF NOT COMPLETED('TESTDEV','ALL') THEN QUIT

    APPL TESTDEV

    .....

     

    More about this function can be found on "User's Guide".

     

    Hope this helps,

     

    Lucy



  • 3.  Re: How to identify the environment that my APPL is running ?

    Posted Jun 07, 2017 09:38 AM

    Thanks Lucy for your response.

     

    As we have lot of ESP APPLs and cannot change the name as per our standards, do you see any other option ? 



  • 4.  Re: How to identify the environment that my APPL is running ?

    Posted Jun 07, 2017 09:46 AM

    As you stated earlier use the LAP with ALL option, update the code to parse out the event prefix.

     

    I would not think it is that much coding.

     

    You are already using the LAP command, correct?

     

    Just add some code to 'find' the line with "BY EVENT" and parse out what you need.



  • 5.  Re: How to identify the environment that my APPL is running ?

    Posted Jun 07, 2017 09:52 AM

    Hi Rick,

     

    Yes, we are already using LAP command and I have suggested our developer to use LAP ALL for BY EVENT line check. But I am still checking there could be any other options that I am unaware of.



  • 6.  Re: How to identify the environment that my APPL is running ?

    Broadcom Employee
    Posted Jun 07, 2017 02:44 PM

    Hi Santhosh,

     

    Another option is to use global variable:

    - Define a global variable table CHKAPPL;

    - Define variables related to the application name and event prefix, like TEST_SANDEV. Variables will have different values when there is an active gen or not. For example, value 'Y' when there is one, and 'N' when none.

    - In ESP Proc:

      - Issue VGET and check if the variable has value 'Y', if yes then quit; otherwise issue VSET it to 'Y' and continue;

      - On APPLEND wob, issue VSET to set the variable value to 'N', so that a new gen can be created. Note: if there is any job that runs after APPLEND, the VSET should be added to the last job.

     

    Thanks,

     

    Lucy