Data Definition Language (DDL) Reference Manual
Dictionary Maintenance
Data Definition Language (DDL) Reference Manual—529431-004
10-4
Deleting Dictionary Objects
Deleting Dictionary Objects
Deleting a dictionary object is comparatively easy if the object is not referenced by
other objects in the dictionary. Objects that are never referenced by other objects are:
•
Records
•
SPI token codes
•
SPI token maps
When an object is referenced by other objects, you must first delete the referring
objects. Objects that can be referenced by other objects are:
•
Constants
•
Definitions
•
SPI token types
Topics:
•
Deleting Unreferenced Objects on page 10-4
•
Deleting Referenced Objects on page 10-5
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, use a DELETE
statement that specifies 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 the DDL compiler
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, the DDL compiler 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 RUN DDL
command or you can run the DDL compiler and use the SOURCE command to
specify the source file.