Dictionary Maintenance
Data Definition Language (DDL) Reference Manual — 426798-002
10- 8
Modifying Unreferenced Objects
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
Modifying Referenced Objects
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
Appendix B, Sample Schemas
.
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
Содержание 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 ...