HP DDL D40 Reference Manual page 225

Data definition language
Table of Contents

Advertisement

Dictionary Manipulation Statements
The DDL compiler generates the following sections of source code for each object
specified in the OUTPUT UPDATE statement:
First section
DELETE statements to delete any objects that directly or indirectly refer to the
specified object.
Second section
A statement to redefine the specified object.
Third and following sections
One section for each statement needed to rebuild the objects deleted in the
first section those objects that refer to the specified object.
To update a specified object, close the DDL source-update file and edit the second
section of the file to make the changes you want to the object definition. Then, use
the SOURCE command to compile the entire DDL source-update file.
To delete a specified object, close the DDL source-update file and use the
SOURCE command to compile only the first section. This instructs the DDL
compiler to delete all referring objects. Then use a DELETE statement to delete the
specified object.
OUTPUT UPDATE Statement Examples
Assume your dictionary contains the objects defined in the database schema from
Appendix B, and that you want to change the size of the ZIP-CD definition from 5 to 9
digits. Because other definitions and records refer either directly or indirectly to ZIP-
CD, you cannot simply change its definition.
To change the definition of ZIP-CD and the records and definitions that refer to it, you
would use OUTPUT UPDATE as follows:
20> DDL dict
!?DDL myfile
!OUTPUT UPDATE zip-cd.
!?NODDL
!?EDIT myfile
.
.
.
*EXIT
!?SOURCE myfile
Data Definition Language (DDL) Reference Manual—426798-002
Run DDL and open the dictionary in the current subvolume
Open a DDL source file
Write update source to MYFILE
Close MYFILE before editing it
Change the definition for ZIP-CD
Exit from the Editor
Compile the contents of MYFILE into the dictionary
8 -9
OUTPUT UPDATE Statement
VST807.vsd

Advertisement

Table of Contents
loading

Table of Contents