Dictionary Maintenance
Data Definition Language (DDL) Reference Manual — 426798-002
10- 2
Adding New Dictionary Objects
The following example re-creates the database schema for the dictionary on
$DATA.SALES and writes it to the new file SCHEMBAK:
Adding New Dictionary Objects
Adding a new dictionary object is usually easier than modifying an existing object
because a new object cannot be referenced by an existing object.
If statements describing new objects refer to previously defined objects in the
dictionary, the dictionary must be open.
When you add a new object, you must be careful that it does not have the same name
as an existing object of the same object type. If it does have the same name, DDL
replaces the existing object with the new object. If you try to add a new object that has
the same name but is of a different type (for example, a new constant with the same
name as an existing record), DDL issues an error message and does not replace the
existing object.
You can specify the new object in an interactive DDL session, but errors are not easy
to correct in a session. So if the object requires more than a few lines of code, it is
generally easier and safer to add a new object noninteractively. To add the object, you
specify the appropriate statements in a source file, open the dictionary, and compile
the source.
To add new objects to the dictionary, do this:
1. Specify the new objects.
2. Build an EDIT source file containing the statements that define the new objects.
3. Open the dictionary. You can include the DICT or DICTN command to open the
dictionary in the source file, or you can specify it later when you compile the source
file.
4. Compile the source file. You can do this by running DDL interactively and using a
SOURCE command to specify the source file, or you can use the DDL run
command and specify the source file as the IN parameter.
39> DDL
!?DICT $data.sales
!?DDL $data.sales.schembak !
!OUTPUT *.
!EXIT
Open the dictionary
Open a new source file
VST1001.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 ...