ALERT: Some images may not load properly within the Knowledge Base Article. If you see a broken image, please right-click and select 'Open image in a new tab'. We apologize for this inconvenience.

How to exclude deleted jobs from a ujo_job query


Article ID: 225467


Updated On:


CA Workload Automation AE


When running a query against the ujo_job table, the results will sometimes contain jobs that have been recently deleted. How can the query be written to filter out the deleted jobs?


The row in ujo_job for a deleted job will stay in the table for 7 days by default. At that time, they are archived by the archive_jobs command that runs as part of the DBMaint script.


Release : 11.3.6/12.0

Component : CA Workload Automation AE (AutoSys)


In the WHERE clause of the query, include is_active=1 AND is_currver=1 to weed out deleted jobs that have not yet been archived. The value for those columns for a deleted job would both be 0.