Modifying Unreferenced Objects - HP DDL D40 Reference Manual

Data definition language
Table of Contents

Advertisement

Dictionary Maintenance
object is referenced by other objects, then you must first delete and then redefine the
referring objects.
Objects that can be referenced by other objects are constants, definitions, and SPI
token types. Modifying these objects is described under
on page 10-9.
Objects that are never referenced by other objects are records, SPI token codes, and
SPI token maps. Modifying these objects is described next.

Modifying Unreferenced Objects

Records, SPI token codes, and SPI token maps are never referenced by other objects.
Other kinds of objects can be referred to. You can use the SHOW USE OF command to
determine whether the object you want to modify is referenced by other objects.
To modify an object not referenced by other objects, build a source-schema file that
contains the definition of the changed object, then compile this source schema file into
the dictionary. You can, of course, change the original source schema directly and
recompile the dictionary, but this causes unnecessary processing if your dictionary
is large.
To modify the object, do this:
1. Open the dictionary. Use a DICT or DICTN command to open the dictionary
containing the object to be modified.
2. Modify the object. To avoid recompiling the entire source schema, write the object
definition from the dictionary to a DDL source file using an OUTPUT statement,
close the DDL source file, and then edit the object definition in the DDL source file.
3. Compile the modified object into the open dictionary. Run the DDL compiler with
the DDL source file as the input file, or compile the source file interactively with the
SOURCE command.
4. You should also modify your original schema if you plan to ever use it to rebuild the
dictionary.
Suppose you want to add a new alternate key field, ORDERDATE, to the record
ORDERS defined in the sample database schema in
The new key field is already defined in the definition ORDERINFO. To specify the key
as an alternate key in ORDER-REC, use the OUTPUT statement to write the record
definition from the open dictionary to a DDL source file. Add the new key specifier to
Data Definition Language (DDL) Reference Manual—426798-002
Modifying Referenced Objects
Appendix B, Sample
10- 8
Modifying Unreferenced Objects
Schemas.

Advertisement

Table of Contents
loading

Table of Contents