AutoSys Workload Automation

 View Only
  • 1.  Count JOB´s registred

    Posted Apr 10, 2018 08:19 AM

    I need to count the number of jobs registered in the dseries, does anyone have the report or the select to get that number?



  • 2.  Re: Count JOB´s registred

    Posted Apr 10, 2018 02:47 PM

    Finding unique jobs defined has been challenging if you don't know how to work with the definitions in the CLOB, which I don't. 

    We have a lot of jobs defined in multiple flows and we want to account for each of those so I run the sql matching up

    appl name, job name, job qualifier.  The below SQL isn't 100% accurate but it gets us pretty close.

     

    Down falls to sql against generic job and application tables

    *if applications/job are defined but turned off and if they have no run history in ESP_APPLICATION or GENERIC_JOB they are not accounted for

    *retired application/jobs that still have run history will be accounted for

    *you would have to decide if you want to run again ESP_ and/or H_ tables, if you want to run again both there is are views set up V_

     

    SQL

    select distinct WA.ESP_APPLICATION.APPL_NAME,WA.ESP_Generic_job.job_name,WA.ESP_Generic_job.job_qualifier
    from WA.ESP_Generic_job,WA.ESP_APPLICATION
    where WA.ESP_APPLICATION.APPL_ID=WA.ESP_GENERIC_JOB.APPL_ID;

     

    Sharon



  • 3.  Re: Count JOB´s registred
    Best Answer

    Posted Apr 11, 2018 04:41 PM

    If your DE is 12.0.x, you can use the 'jobmap' cli command to display the events/applications/jobs, e.g. for all defined - 

    jobmap event("*")



  • 4.  Re: Count JOB´s registred

    Broadcom Employee
    Posted Apr 12, 2018 06:59 AM

    In addition to what Mikhail said, if you export the result of "jobmap" command to a text file, you could open it in notepad++ and search for all the occurrences of "job name" string.

     

    It will return the number of the occurrences of this string, that means the number of jobs. 

     

    Not an elegant solution, but it works and it is very easy to execute.



  • 5.  Re: Count JOB´s registred

    Posted Apr 12, 2018 08:00 AM

    question the CLI command jobmap - would there be any watch outs for number of events, applications, jobs

    because if we want a total job count we would have to do

    jobmap events("*")

     

     

    Sharon



  • 6.  Re: Count JOB´s registred

    Broadcom Employee
    Posted Apr 12, 2018 08:19 AM

    Hi Sharon,

     

    Yes, the idea is to run the jobmap events("*") command to get ALL the info related. 



  • 7.  Re: Count JOB´s registred

    Posted Apr 12, 2018 08:21 AM

    I just want to make sure there is no concern with the volume of output from that command,



  • 8.  Re: Count JOB´s registred

    Broadcom Employee
    Posted Apr 12, 2018 08:37 AM

    We do not expect problem running it, but you can experience a delay when running the command, depending on the number of jobs involved... You could run CLI in a command prompt instead using Desktop client's CLI.

     

    But you can filter/reduce the amount of data returned by the command...

     

    ex: jobmap events("*") displayfields("targetjobname")