Dictionary Maintenance
Data Definition Language (DDL) Reference Manual — 426798-002
10- 3
Deleting Dictionary Objects
The following example adds a new record to the dictionary on $DATA.SALES:
Return to the command interpreter. Run the DDL compiler and open the dictionary.
Use the SOURCE command to specify the EDIT file you just created, as follows:
41> DDL DICT $data.sales
!?SOURCE newsrc
1 RECORD dependents.
2 FILE IS $data.sales.empdep KEY-SEQUENCED
3 AUDIT.
4 02 dep-key.
5 04 empnum TYPE *.
6 04 depnum PIC X(4).
7 02 depname TYPE name.
8 02 age PIC 9(2).
9 02 sex PIC X(2).
10 88 female VALUE "01".
11 88 male VALUE "02".
12 KEY IS dep-key.
13 END
Record DEPENDENTS size is 34 bytes.
Record DEPENDENTS added to dictionary.
!EXIT
Notice that the record DEPENDENTS contains two fields (EMPNUM and DEPNAME)
that refer to existing objects in the dictionary.
Deleting Dictionary Objects
Deleting a dictionary object is comparatively easy if the object is not referenced by
other objects in the dictionary. Objects that are never referenced by other objects are:
records, SPI token codes, and SPI token maps. The technique for deleting such
objects is described under
Deleting Unreferenced Objects
on page 10-4.
When an object is referenced by other objects, you must first delete the referring
objects. Constants, definitions, and SPI token types can be referenced by other
40> EDIT newsrc !; ADD
1 RECORD dependents.
2 FILE IS $data.sales.empdep KEY-
SEQUENCED
3 AUDIT.
4 02 dep-key.
5 04 empnum TYPE *.
6 04 depnum PIC X(4).
7 02 depname TYPE name.
8 02 age PIC 9(2).
9 02 sex PIC X(2).
10 88 female VALUE "01".
11 88 male VALUE "02".
12 KEY IS dep-key.
13 END
14 //
*EXIT
Specify a new record
VST1002.vsd