We are unable to delete an external instance definition via jil in the CA Workload Automation AE (AutoSys)
Example:
# jil
jil>>1> delete_xinst: PRD
jil>>2> exit
______________________________________________________________________________
CAUAJM_I_50323 Deleting External Instance: PRD
CAUAJM_E_19017 External Instance "PRD" is being used and will not be deleted.
CAUAJM_E_10302 Database Change WAS NOT successful.
______________________________________________________________________________
CAUAJM_E_50198 Exit Code = 1
______________________________________________________________________________
Workload Automation AE (AutoSys)
In order for an external instance definition to be deleted there can be no active references to it.
All cross instance dependencies between the two instances must be removed before the instance definition can be deleted.
Example: 2 instance: QA1 and QA2
From QA1
Run "autorep -X ALL"
This will confirm which external AutoSys instances QA1 has been configured to communicate with.
NOTE - The Assumption is we see QA2 and possibly others.
Run "autorep -q -J ALL > /tmp/alljobs-QA1.out"
then search the alljobs-QA1.out file for the external instance name(s) you are trying to break the communication with.
Example: ^QA2
You would either delete the jobs with the cross instance reference completely or modify their conditions, removing the reference to the QA2 instance.
(see jil syntax for delete_job and update_job).
Repeat all the steps above in the other external instance(s).
In the above example that would be QA2
Once the above has been completed you may remove the external instance definition(s) without issues.