Per Job license model
About this task
To generate a report that summarizes your monthly per-job license usage, you can generate a license metric tag file (SLMTag). The SLM tag that is generated applies the 100 monthly jobs pricing method where, the job count increments by 1 for every 100 successfully executed jobs you run and 1 job is counted when you run anywhere from 1 to 100 jobs. For example, if you run 340 jobs, 4 licenses are counted.
-- “((Actual_workstation_name_in_run ='WKS_NAME1' AND
-- ACTUAL_WKS_FOLDER_NAME_IN_RUN = '/FOL_WKS1/') OR
-- (Actual_workstation_name_in_run = 'WKS_NAME2' AND
-- ACTUAL_WKS_FOLDER_NAME_IN_RUN = '/FOL_WKS2/')) and "
remove
the double dashes (—), and replace the '/FOL_WKS1/',
'WKS_NAME1', '/FOL_WKS2/',
'WKS_NAME2' strings with your folder and workstation couples.The master domain manager centrally maintains the history of the jobs that you run in your environment. By using the optman global option, statsHistory, you can set the number of days for which you maintain the history of the jobs. To track your monthly per-job license usage, set the value of statsHistory to 400 (which is the default value). For more information about statsHistory, see Global options - detailed description.
Queries to verify the number of jobs you run every month
About this task
An SQL query is provided that accesses the job history in the database to verify the number of jobs that you run every month in your environment. The job runs calculated with this query are not grouped in groups of 100 as with the previous queries, but are instead, the total number of jobs that ran.
You can run the SQL query either from the command-line interface of your database, or by creating your custom SQL report tasks from the Dynamic Workload Console.
- For DB2 database type:
SELECT Year, Month, count(*) AS JobNbr from (SELECT unique year(Job_run_date_time) AS Year, month(Job_run_date_time) AS Month, day(Job_run_date_time) AS day, JOB_STREAM_WKS_FOL_NAME, JOB_STREAM_WKS_NAME_IN_RUN, JOB_STREAM_FOLDER_NAME, JOB_STREAM_NAME_IN_RUN, JOB_NAME_IN_RUN FROM MDL.JOB_HISTORY_V WHERE Job_status='S' and --((Actual_workstation_name_in_run = 'WKS_NAME1' AND -- ACTUAL_WKS_FOLDER_NAME_IN_RUN = '/FOL_WKS1/') OR -- (Actual_workstation_name_in_run = 'WKS_NAME2' AND ACTUAL_WKS_FOLDER_NAME_IN_RUN = '/FOL_WKS2/')) and (Actual_WKS_FOLDER_NAME_IN_RUN, Actual_workstation_name_in_run) not in (select FOL_PATH, WKS_NAME from MDL.WKS_WORKSTATIONS W JOIN MDL.FOL_FOLDERS F ON W.FOL_ID=f.FOL_ID where W.WKS_AGENT_TYPE='E')) GROUP BY Year, Month
- For ORACLE database type:
SELECT Year, Month, cast (count(*) AS INT) AS JobNbr from (SELECT unique EXTRACT(year FROM Job_run_date_time) AS Year, EXTRACT(month FROM Job_run_date_time) AS Month, EXTRACT(day FROM Job_run_date_time) AS Day, JOB_STREAM_WKS_FOL_NAME, JOB_STREAM_WKS_NAME_IN_RUN, JOB_STREAM_FOLDER_NAME, JOB_STREAM_NAME_IN_RUN, JOB_NAME_IN_RUN FROM JOB_HISTORY_V WHERE Job_status='S' and -- ((Actual_workstation_name_in_run = 'WKS_NAME1' AND -- ACTUAL_WKS_FOLDER_NAME_IN_RUN = '/FOL_WKS1/') OR -- (Actual_workstation_name_in_run = 'WKS_NAME2' AND -- ACTUAL_WKS_FOLDER_NAME_IN_RUN = '/FOL_WKS2/')) and (Actual_WKS_FOLDER_NAME_IN_RUN, Actual_workstation_name_in_run) not in (select FOL_PATH, WKS_NAME from WKS_WORKSTATIONS W JOIN FOL_FOLDERS F ON W.FOL_ID=f.FOL_ID where W.WKS_AGENT_TYPE='E')) GROUP BY Year, Month
- For Informix and OneDB database types:
SELECT Year, Month, count(*) AS JobNbr from (SELECT unique year(Job_run_date_time) AS Year, month(Job_run_date_time) AS Month, day(Job_run_date_time) AS day, JOB_STREAM_WKS_FOL_NAME, JOB_STREAM_WKS_NAME_IN_RUN, JOB_STREAM_FOLDER_NAME, JOB_STREAM_NAME_IN_RUN, JOB_NAME_IN_RUN FROM MDL.JOB_HISTORY_V WHERE Job_status='S' and -- ((Actual_workstation_name_in_run = 'WKS_NAME1' AND -- ACTUAL_WKS_FOLDER_NAME_IN_RUN = '/FOL_WKS1/') OR -- (Actual_workstation_name_in_run = 'WKS_NAME2' AND -- ACTUAL_WKS_FOLDER_NAME_IN_RUN = '/FOL_WKS2/')) and not exists (select 1 from MDL.WKS_WORKSTATIONS W JOIN MDL.FOL_FOLDERS F ON W.FOL_ID=F.FOL_ID where W.WKS_AGENT_TYPE='E' AND Actual_wks_folder_name_in_run = F.FOL_PATH AND Actual_workstation_name_in_run = W.WKS_NAME)) GROUP BY Year, Month
- For MSSQL, Azure SQL, and Google Cloud SQL for SQL server database
types:
SELECT Year, Month, count(*) AS JobNbr from (SELECT distinct year(Job_run_date_time) AS Year, month(Job_run_date_time) AS Month, day(Job_run_date_time) AS day, Job_stream_wks_fol_name, Job_stream_wks_name_in_run, Job_stream_folder_name, Job_stream_name_in_run, Job_name_in_run FROM MDL.JOB_HISTORY_V WHERE Job_status='S' and --((Actual_workstation_name_in_run = 'WKS_NAME1' AND -- Actual_wks_folder_name_in_run = '/FOL_WKS1/') OR -- (Actual_workstation_name_in_run = 'WKS_NAME2' AND -- Actual_wks_folder_name_in_run = '/FOL_WKS2/')) AND not exists (select 1 from MDL.WKS_WORKSTATIONS W JOIN MDL.FOL_FOLDERS F ON W.FOL_ID=F.FOL_ID where W.WKS_AGENT_TYPE='E' AND Actual_wks_folder_name_in_run = F.FOL_PATH AND Actual_workstation_name_in_run = W.WKS_NAME)) r GROUP BY Year, Month
- All jobs processed or managed by HCL Workload Automation are counted, but the same job counts once if repeated more than once during the same day. To meet this requirement and be considered as the same job, jobs must contain the same jobstream_workstation_name, jobstream_name and job_name strings and not run on a remote engine.
- The SQL queries select only jobs that run successfully. The SQL queries do not count shadow jobs, jobs that run on agent for z/OS, and rerun jobs.