COBOL Manual for TNS and TNS/R Programs
Creating and Compiling HP COBOL Source
Programs
HP COBOL Manual for TNS and TNS/R Programs—522555-006
22-25
Using Data Definition Language (DDL)
Using Data Definition Language (DDL)
Data Definition Language (DDL) is a language with which you describe the data
structures of a database. The DDL compiler reads your description and generates a
data declaration library (a COPY library) for the database and a File Utility Program
(FUP) command file for building the database files. DDL also lets you create and
maintain a data dictionary for your database. Because DDL can create data
declarations for other programming languages, it facilitates sharing data structures in
mixed-language programs.
Topics:
•
Describing the Data Structures
•
Data Declaration (COPY) Library
•
File Utility Program (FUP) Commands
•
Data Dictionary
Describing the Data Structures
You describe the data structures of your database with DEFINE statements. Each data
item can be an elementary item or a data structure. A data item can be composed of
explicit, COBOL-like definitions or it can refer to data items defined earlier in the data
dictionary. In the latter case, you define records with RECORD statements. A record
definition can include both explicitly defined data items and data items defined earlier
in the data dictionary.
In Example 22-3, note the absence of the level number 01.
Figure 22-3. DDL Input and Output
Your
Description
DDL
Compiler
Data Declaration
(COPY) Library
FUP
Command File
Data
Dictionary
VST700.vsd