Previous Topic: -15 - AUTHID (auth-id) NOT DEFINEDNext Topic: -17 - MODIFICATION OF COLUMN TO INCOMPATIBLE DATATYPE IS NOT ALLOWED


-16 - DEPENDENT PLAN (auth-id.plan-name) IN USE

Reason:

In the message text above, auth-id represents the authorization ID and plan-name is the name of your plan.

You received this message because you are trying to use a plan that is already in use. The dependent plan is using a referenced table. For example, to remove a foreign key, the dependent plan is using the referenced (parent) table that contains valid foreign key values.

If -16 is received while attempting to drop a procedure, the plan of another procedure that is currently or was recently active has called that procedure. CA Datacom does not allow the called procedure to be dropped during this transaction because the caller might need that entity again. Performing a COMMIT generally resolves the issue and allows the DROP to proceed. Occasionally, however, you have to run the drop after the run-unit of the caller ends, for example when PLNCLOSE=R on the caller prevents certain COMMIT-time cleanup. We therefore recommend that all procedures use PLNCLOSE=T.

The SQLSTATE that equates to this SQL return code is 57S07.

Action:

To find the job with a plan accessing the referenced table, you can query to virtual table SQL_STATUS_URT using DBSQLPR as:

 SELECT JOB_NAME, CLS_OPT, USERS
   FROM SQL_STATUS_URT
  WHERE DBID = (dbid #)
    AND DB_TBL_NAME = (table name)

If the CLS_OPT is R (run unit) and the JOB_NAME is a CICS job, you need to close the User Requirements Table (URT) with SQL=YES to close the plan holding the URT(s) open.

Wait until the plan is closed then try again. This error is issued when CA Datacom/DB gets a DSF return code of NP14 from CA Datacom Datadictionary. See DSF Return Codes.