Dictionary Maintenance
Data Definition Language (DDL) Reference Manual — 426798-002
10- 4
Deleting Unreferenced Objects
objects. The technique for deleting referenced objects is described later in this
subsection under
Deleting Referenced Objects
, following.
Deleting Unreferenced Objects
When you delete a record, an SPI token code, or an SPI token map, you need not be
concerned that the deletion affects other objects in the dictionary. These objects are
never referenced by other objects. Other objects that can be referenced might also be
unreferenced. You can use the SHOW USE OF command to determine whether the
object you want to delete is referenced by other objects.
To delete an object that is not referenced by any other object, you use a DELETE
statement naming the object to be deleted. The exact procedure depends on whether
you make the deletion interactively or compile a source file containing the DELETE
statement. In either case, you must first open the dictionary from which you are
deleting the object.
To delete the object from the dictionary, do this:
1. Open the dictionary. The dictionary must be open before DDL executes the
DELETE statement.
2. Specify the DELETE statement or statements. You can specify the statement in an
interactive DDL session.
3. Compile the DELETE statement. If you enter the statement in an interactive
session, DDL compiles the statement as you enter it. If the statement is in a source
file, you can specify the file as the IN parameter of a DDL run command or you can
run DDL and use the SOURCE command to specify the source file.
The following example builds a source file containing the code to open the dictionary
and delete one record. When DDL compiles the source file, it opens the dictionary and
deletes the record DEPENDENT-INFO from the open dictionary.
Deleting Referenced Objects
When you delete a constant, a definition, or a SPI token type that is referenced by any
other objects, you must first delete all objects that refer directly or indirectly to the
object you want to delete. You can use the SHOW USE OF statement to determine
whether the object is referred to and by which other objects.
42> EDIT delsrc; add
1 ?DICT $data.sales
2 DELETE RECORD dependent-info .
3 //
*EXIT
43> DDL /IN delsrc/
Remember the period
Send listing to your terminal
VST1003.vsd
Содержание 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 ...