Report of CA 7 jobs that ran within a specified time frame using SQL statements
search cancel

Report of CA 7 jobs that ran within a specified time frame using SQL statements

book

Article ID: 277354

calendar_today

Updated On:

Products

CA 7 Workload Automation

Issue/Introduction

 

Is there a CA 7 report to show the number of active jobs based on the following:  

Number of Active jobs daily, weekly, monthly, quarterly, half year and yearly 

Resolution

While there is not a specific CA 7 report available,  SQL  can be used to generate this type of information.  The example SQL  below provides the number of active jobs in the application with last run date and time and  how many times jobs ran application wise  for the last one year (between 2022-12-19 and 2023-12-18).  Change the DATE(J.START_TIME) range to the appropriate values to generate the report for daily, weekly, monthly, quarterly, half year or yearly results.  

 

 //STEP1       EXEC PGM=DBSQLPR                                   
//STEPLIB    DD  DISP=SHR,DSN=your.CUSLIB  
//                   DD  DISP=SHR,DSN=your.CAAXLOAD 
//SYSPRINT DD SYSOUT=*                                     
//STDOUT    DD SYSOUT=*                                       
//OPTIONS   DD *                                             
PRTWIDTH=255                                               
INPUTWIDTH=70                                              
ROWLIMIT=5000                                              
AUTHID=MFWA                                                
NOTYPE                                                     
//SYSIN         DD *              
SELECT JOB,DATE(J.START_TIME) AS LAST_DATE,
           TIME(J.START_TIME) AS LAST_TIME,J.NUM_RUNS,
           CA7_SYSTEM AS SYSTEM
FROM CA7_JOB J
WHERE DB= 'YOUR LOGICAL_DATABASE'
AND DATE(J.START_TIME) >= '2022-12-19'
AND DATE(J.START_TIME) <= '2023-12-18';

 

 

Additional Information

This information can also be obtained from the LJOB command--EX:  LJOB,JOB=*,LRUNDATE=(23350,23365).   Specify the appropriate values to generate the report for daily, weekly, monthly, quarterly, half year or yearly results.  This command can be run in batch via the BTI job.