|Contents:||Main||Chapter||See Also:||Getting Started Manual||Advanced User Manual|
Occasionally you may need to delete a file's data dictionary and its entry in ^DIC in order to properly update a running system. Use this entry point to do it.
You usually have the option of deleting the data when you delete the data dictionary. (See the DIU(0) variable below.) However, data will always be deleted if your file is in ^DIC(File#,. Be careful using this utility when your data is in the ^DIC global.
In all cases, both DIU and DIU(0) are returned from the call. You will find that DIU is returned as the global root regardless of whether it was defined as the file number or as the global root when making the call.
NOTE: If the root of a file's data is an unsubscripted global [e.g., DIU="^MYDATA("], you must make sure that the systems on which you want to perform the deletion do not restrict the killing of the affected unsubscripted globals.
REMINDER: It is your responsibility to clean up (kill) DIU, the input variable, after any call to this routine!
(Required) The file number or global root, e.g., ^DIZ(16000.1,. This must be a subfile number when deleting a subfile's data dictionary.
Input parameter string that may contain the following:
|D||Delete the data as well as the data dictionary.|
|E||Echo back information during deletion.|
|S||Subfile data dictionary is to be deleted.|
|T||Templates are to be deleted.|
>S DIU="^DIZ(16000.1,",DIU(0)="" D EN^DIU2
Only the data dictionary will be deleted. The data and templates remain. By including either the D or T, you can also delete the data or the templates. If the E is included, then the user will be asked whether or not the global should be deleted.
If you want to delete the dictionary for a subfile, you must include the S in DIU(0). The variable, DIU, in this case must be a subfile data dictionary number. It cannot be a global root. When deleting a subfile's dictionary, all dictionaries subordinate to that dictionary are also deleted. Data can also be deleted when deleting a subfile; this process could take some time depending on the number of entries in the whole file.
>S DIU=16000.01,DIU(0)="S" D EN^DIU2
Reviewed/Updated: March 8, 2007