delete-server-temporary-plans

Document ID : KB000099207
Last Modified Date : 07/06/2018
Show Technical Document Details
Introduction:
In very old releases of CA Datacom Server, it may have been that some temporary plans did not successfully get deleted if the Datacom Server connection was not ended successfully. This article gives the steps to delete them.
Question:
How can I delete old PLANs that were temporary plans created by CA Datacom Server in the past?
Answer:
Run a DD report to identify the PLANs and determine which to be deleted.
Refer to KB000098939 "Print list of all Datacom SQL PLANS"
https://comm.support.ca.com/kb/print-list-of-all-datacom-sql-plans/KB000098939

If the PLANs to be deleted have the same AUTHID as the active Datacom Server, first start the mainframe Datacom Server under a different AUTHID startup parameter.

To delete one or only a few plans, use the SQL Mode of Datadictionary Online (DDOL): 
1.  Signon to DDOL.                                                          
2.  Select SQL mode.                                                         
3.  Select SQLADMIN.                                                         
4.  Enter the name of the PLAN to be deleted and the authorization-id.       
5.  Enter PF9 to execute the delete command.                                 
                                                                           
To delete a large number of plans, use batch DDUPDATE: 
1. Using batch DDUPDATE, delete the PLAN twice, using the version number of the plan. For example: 
     -DEL PLAN,oldauthid-planname(001)
   
 -END
     -DEL PLAN,oldauthid-planname(001)  
     -END
                                                                           
Deleting the PLAN the first time moves the PLAN from production to history status in the dictionary.
Deleting it the second time removes the PLAN from DD and from the DDD.
Deleting the PLAN also removes all associated STATEMENTs for the PLAN.                                   
                                                                           
Note:  Be sure to delete the PLAN *twice* so no plan remains in history status. A plan put into history status cannot be dropped by SQL, nor can a new plan of the same name be later created (due to duplicate names).