Dictionary Maintenance
Data Definition Language (DDL) Reference Manual — 426798-002
10- 5
Deleting Referenced Objects
If the object you want to delete is never referenced by another object, use the
technique described under
Deleting Unreferenced Objects
, preceding. If the object you
want to delete is referred to, you must first delete the referring objects in an exact
sequence. Consider the following example:
CONSTANT a VALUE IS 1.
DEF b TYPE BINARY VALUE IS a.
DEF c TYPE b.
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.
Содержание DDL D40
Страница 36: ...Introduction to DDL Data Definition Language DDL Reference Manual 426798 002 1 14 Examining a Dictionary ...
Страница 66: ...Named Constants Data Definition Language DDL Reference Manual 426798 002 4 10 Standard SPI Constants ...
Страница 230: ...Dictionary Manipulation Statements Data Definition Language DDL Reference Manual 426798 002 8 14 SHOW USE OF Statement ...
Страница 370: ...Dictionary Maintenance Data Definition Language DDL Reference Manual 426798 002 10 24 Converting a Dictionary ...
Страница 456: ...Sample Schemas Data Definition Language DDL Reference Manual 426798 002 B 12 ASSNDDL Statements ...
Страница 470: ...DDL Data Translation Data Definition Language DDL Reference Manual 426798 002 C 14 ...
Страница 528: ...Dictionary Reports Data Definition Language DDL Reference Manual 426798 002 E 8 Requesting Reports ...
Страница 552: ...DDL Alignment Rules Data Definition Language DDL Reference Manual 426798 002 H 4 FIELDALIGN_SHARED8 Alignment Rules ...
Страница 576: ...Index Data Definition Language DDL Reference Manual 426798 002 Index 22 Special Characters ...