Data Definition Language (DDL) Reference Manual
Dictionary Maintenance
Data Definition Language (DDL) Reference Manual—529431-004
10-7
Deleting Referenced Objects
Example 10-5. Deleting a Referenced Object From a Dictionary (page 1 of 2)
The referenced object, age, in the dictionary:
DEF age PIC 99.
DEF employ.
02 empnum PIC 9(4).
02 empname PIC X(18).
02 age TYPE *.
END
RECORD employee. FILE IS ASSIGNED.
02 employ TYPE *.
02 region PIC 9(4).
02 branchnum PIC 9(4).
END
Removing age from the dictionary:
44> DDL DICT $data.sales
Run the DDL compiler and open dictionary
Dictionary opened on subvol $DATA.SALES for update access
!?DDL delfile
Open new DDL source file
Output source for DDL opened on $DATA.SALES.DELFILE
!OUTPUT UPDATE age.
Write update statements to DELFILE
Searching for objects affected by AGE
Loading Definition AGE
DDL source output produced for AGE.
Loading Definition EMPLOY
DDL source output produced for EMPLOY.
Loading Record EMPLOYEE
DDL source output produced for EMPLOYEE.
!?NODDL delfile
Close DDL file DELFILE
!?EDIT delfile; L 1/10
List DELFILE
1 ?Section AGE-DELETES
2 Delete Record EMPLOYEE
3 Delete Definition EMPLOY
4
Get name of section with DELETE
statements
5 ?Section AGE
6 ...
7
Section to define AGE followed by sections
to redefine objects that refer to AGE
8 ?Section EMPLOY
9 ...
10
*EXIT
!?SOURCE delfile (age-deletes)
Submit section to DDL
1 ?Section AGE-DELETES
2 Delete Record EMPLOYEE
DDL compiler executes AGE-DELETES