Autosys: How to find non-existent dependencies on all existing job definitions?
search cancel

Autosys: How to find non-existent dependencies on all existing job definitions?

book

Article ID: 103887

calendar_today

Updated On:

Products

CA Workload Automation AE - Business Agents (AutoSys) CA Workload Automation AE - Scheduler (AutoSys) Workload Automation Agent

Issue/Introduction



 What is the best way to find jobs that may have non-existing dependencies (conditions) in their job definitions?

 

Environment

Release:
Component: ATSYS

Resolution

 
If the job is already in the database,  use the following command: job_depends -c -J ALL 

If there is a non-existent dependency, ** NOT EXIST ** will appear under 'Current Status' 
In the example below JobABC does not exist.
 
job_depends -c -J test-Oct27 

Documentation: https://docops.ca.com/ca-workload-automation-ae/11-4-2/en/reference/ae-commands
/monitor-and-report-on-workload/job_depends-command-generate-detailed-reports-of-job-dependencies-and-conditions

(-c (Optional) Returns the current state of the job and the names of any jobs that 
depend on it.)

OUTPUT:
=======


Job Name   Status/Exec. Mode  Date Cond?   Start Cond?   Dep. Cond? 
--------          -----------------              ------------          -----------       ---------- 
test-Oct27      SUCCESS                  No                   Yes               No 

Condition: s(JobABC) 
Atomic Condition   Current Status T/F 
----------------            --------------       --- 
s(JobABC)            *NOT_EXIST*   F 

--------------------------- 
Another way to check job dependencies: jil -V batch < inputfile:

 -V none|job|batch|syntax
              Specifies  whether  the  JIL processor should verify the validity of the job
              definitions and that jobs specified in the job dependency  conditions  
              actually exist in the CA Workload Automation AE database.


The jil -V Batch would be used when loading jobs into the Database, if they exist, it tries to INSERT them again. Below is an example of loading a jil file with 1 job definition, with a non-existing condition job.
Whether the job(s) exist or not the report will still identify missing conditions.

jil -V batch < test-cond 
______________________________________________________________________________ 

CAUAJM_I_50323 Inserting/Updating job: test-cond 
CAUAJM_W_10282 WARNING for Job: test-cond. The date_conditions attribute is FALSE. 
   The scheduler will ignore date attributes 
CAUAJM_I_50205 Database Change WAS Successful! 

CAUAJM_W_50258 *** WARNING: The following Jobs have starting conditions that 
depend on nonexistent Jobs or Global Variables: 


Job Name                     Missing Condition Job Name or Global Variable         Condition Type 
------------------------------ ---------------------------------------------                                ---------------- 
test-Oct27                         JobABC                                                                          Job 
test-cond                           JobABC                                                                          Job 
______________________________________________________________________________ 

CAUAJM_I_52301 Exit Code = 0