Introduction/Summary:
How to gather a list of job names within the CA Workload Automation AE (AutoSys Edition) database for a specific status, between a specific date/time range.
Environment:
CA Workload Automation AE 11.3 or higher
Instructions:
Step 1. You will need to translate the dates you want into "unix time" (which is in
seconds). To do this you will use the "time0" utility that is available with
AutoSys, located in $AUTOSYS/bin. You will need both the start and ending date/time from the time0 command.
Example:
Beginning date/time:
time0 -T "04/01/2016 00:00"
CAUAJM_I_50099 Autotime(internal): 1459483200
Ending date/time:
time0 -T "04/01/2016 23:59"
CAUAJM_I_50099 Autotime(internal): 1459569540
Step 2. Login to the database as aedbadmin.
Step 3. Now you can query the database for specific information.
select j.job_name, p.status from ujo_job j inner join ujo_proc_event p on j.joid=p.joid where event_time_gmt between 1459483200 and 1459569540;
The select statement above, retrieves the job name and current status of the job.
You can also query the same table for specific statuses.
For example:
select j.job_name, p.status from ujo_job j inner join ujo_proc_event p on j.joid=p.joid where p.status = 7 and event_time_gmt between 1459483200 and 1459569540;
This query obtains jobs that were placed ON_ICE during a particular date/time frame.
Note:
Status Codes:
1 RUNNING
3 STARTING
4 SUCCESS
5 FAILURE
6 TERMINATED
7 ON_ICE
8 INACTIVE
9 ACTIVATED
10 RESTART
11 ON_HOLD
12 QUE_WAIT