Data Definition Language (DDL) Reference Manual
Dictionary Maintenance
Data Definition Language (DDL) Reference Manual—529431-004
10-12
Modifying Referenced Objects
6. Compile the DDL source file. If you are still in an interactive session, use the
SOURCE command to submit the source file to the compiler. If you exited from the
DDL compiler after Step 4, run the DDL compiler from the command interpreter
specifying the DDL source file as the input file.
Suppose postal zip codes must be changed from five digits to nine digits. The sample
database schema in Appendix B, Sample Schemas, includes a definition of the object
ZIP-CD, which is referenced by three definitions (SUPPINFO, CUSTINFO, and ADDR)
and by two records (SUPPLIER and CUSTOMER). Example 10-9 on page 10-12
shows the statements and commands you can use to modify ZIP-CD.
Example 10-9. Modifying a Reference Object (page 1 of 2)
47> DDL DICT $data.sales
Run the DDL compiler and open dictionary
Dictionary opened on subvol $DATA.SALES for update access
!?DDL modfile !
Open and clear DDL source MODFILE
Output source for DDL is opened on $DATA.SALES.MODFILE
!OUTPUT UPDATE zip-cd.
Write update statements to MODFILE
Searching for objects affected by ZIP-CD
Loading Definition ZIP-CD
DDL source output produced for ZIP-CD.
Loading Definition ADDR
DDL source output produced for ADDR.
Loading Definition CUSTINFO
DDL source output produced for CUSTINFO.
Loading Definition SUPPINFO
DDL source output produced for SUPPINFO.
Loading Definition CUSTOMER
DDL source output produced for CUSTOMER.
Loading Definition SUPPLIER
DDL source output produced for SUPPLIER.
!?NODDL
Close DDL source file
!?EDIT modfile; xvs f
Edit MODFILE
?Section ZIP-CD-DELETES
Delete Record SUPPLIER.
...
Delete Definition ADDR.
Statements to delete referring objects
?Section ZIP-CD
Definition to be modified
Definition ZIP-CD PIC "9(5)".
Change to 9(9)
?Section ADDR
...
?Section SUPPLIER
Record SUPPLIER.
...
End
Statements to redefine deleted objects