How to get a list of AutoSys jobs which have been On Ice for 30 or more days

Document ID : KB000013364
Last Modified Date : 14/02/2018
Show Technical Document Details
Question:

How to get a list of AutoSys jobs which have been On Ice for 30 or more days.

 

Environment:
Workload Automation AE - 11.3.xPlatform - ANYDatabase - Oracle
Answer:

You can extract the information from the database directly.

 

Example:

select job_name,status,status_time

from ujo_jobst

where status =7 and status_time < 1483249000

order by job_name; 

 

* Note - the status field is in internal number used to represent a status (7=ON_ICE). 

To decode these status values you may query the ujo_intcodes table in the AE database. 

Example: select * from ujo_intcodes where FLD='status' 

 

* Note - the status_time field is stored in unix epoch time. 

You can make use of the autosys time0 command to assist you setting the appropriate value for you needs. 

https://docops.ca.com/ca-wla-ae-wcc/11-4-2/en/reference/ae-commands/maintain-system/time0-commandcalculate-internal-ca-workload-automation-ae-time 

 

A second way to extract the information would be to use the AE SDK to code your own program to extract the data.  This is the preferred method as the database schema can change from version to version, where as CA is committed to ensuring the API's will work from version to version. 

https://support.ca.com/cadocs/7/CA%20Workload%20Automation%20AE%20r11%203-ENU/Bookshelf_Files/PDF/WA_AE_API_ENU.pdf