Sample SQL to list CA 7 job status from CA7_RUN_LOG data
search cancel

Sample SQL to list CA 7 job status from CA7_RUN_LOG data

book

Article ID: 375213

calendar_today

Updated On:

Products

CA 7 Workload Automation

Issue/Introduction

You can use SQL to extract data from the CA 7 database.

This sample of SQL control statements will list CA 7 job start times, job end times and job status (successful & unsuccessful) from CA 7 Run_LOG for last month.

Environment

Release : 12.0, 12.1

Component : CA 7

Resolution

SELECT                                             
CASE EVENT_TYPE                                    
WHEN 1 THEN 'C'                                    
WHEN 2 THEN 'F'                                    
WHEN 3 THEN 'R'                                    
ELSE        'X'                                    
END AS T,                                          
SUBSTR(OBJECT_NAME,1,8) AS JOB,                    
COMPLETION_CODE AS STATUS                          
FROM CA7_RUN_LOG                                   
WHERE DB = 'YOURDB'                           
AND CAST(MONTH(END_DATE_TIME) AS INTEGER) =        
(CAST(MONTH(CURRENT DATE) AS INTEGER) - 1)         
ORDER BY JOB ;    

Additional Information

As always, please contact CA Technologies support for CA Workload Automation CA 7 Edition if you have further questions.