HP DDL D40 Reference Manual page 351

Data definition language
Table of Contents

Advertisement

Dictionary Maintenance
If the object you want to delete is never referenced by another object, use the
technique described under
want to delete is referred to, you must first delete the referring objects in an exact
sequence. Consider the following example:
CONSTANT a
DEF
b
DEF
c
To delete the constant A, you must first delete definition B because it refers to A;
however, to delete B, you must first delete definition C because it refers to B. Thus, the
sequence of deletions is to delete C, then B, then A. This ensures that you do not
attempt to delete an object referenced by another object.
When an object is referenced by many objects, it is a tedious process to delete all the
objects that refer to it directly and indirectly and to delete them in the correct sequence.
The OUTPUT UPDATE statement helps you with this task by performing the following
functions:
It locates all constants, definitions, records, token codes, token types, and token
maps that refer to the object to be deleted.
It writes the DELETE statements to delete the referring objects in the correct
sequence in the first section of an open DDL source file.
It redefines the specified object, in the second section of an open DDL source file.
It writes the statements to rebuild the objects that referred to the specified object, in
a section for each referring object.
After executing OUTPUT UPDATE, you can use the SOURCE command to execute
the DELETE statements in the DDL source file section written by OUTPUT UPDATE.
After the objects that refer to an object are deleted, you can delete the referenced
object.
Assume you are running DDL interactively. To delete a referenced constant, definition,
or SPI token type from the dictionary, do this:
1. Open the dictionary containing the object to be deleted.
2. Open a new DDL source file for the output from OUTPUT UPDATE.
3. Use the OUTPUT UPDATE statement to write the DDL source file containing the
DELETE statements for objects that refer to the specified object.
4. Examine the DDL source file to get the section name containing the DELETE
statements; to do this:
a. Close the DDL source file with a NODDL command. If you omit this step, you
will get a FILE IN USE message when you try to edit this file.
Data Definition Language (DDL) Reference Manual—426798-002
Deleting Unreferenced
VALUE IS 1.
TYPE BINARY
VALUE IS a.
TYPE b.
Objects, preceding. If the object you
10- 5
Deleting Referenced Objects

Advertisement

Table of Contents
loading

Table of Contents