Data Definition Language (DDL) Reference Manual
Introduction to DDL
Data Definition Language (DDL) Reference Manual—529431-004
1-10
Generating Source Code
C, COBOL, FORTRAN, Pascal (on D-series systems), pTAL, TACL, or TAL commands
in the schema. When the DDL compiler compiles the schema, it opens a file for each
specified language, translates the subsequent object definition statements to source
code for those languages, and writes the code to the language files.
You can also generate source code from an existing dictionary. To do this, you can
add a language command to your schema and recompile the entire schema. Typically,
however, you run the DDL compiler interactively, open the dictionary and a language
source code file, and use the OUTPUT statement to specify the object definitions you
want generated in the source language. This technique is particularly useful for writing
selected definitions to the language source code file.
Figure 1-4 on page 1-11 shows two techniques for generating language source code.
These techniques are:
1. Generate source code for the entire schema.
Enter the commands to open a dictionary and a language source code file in the
schema before entering the definitions. Then run the DDL compiler to compile the
schema. the DDL compiler builds the dictionary and then generates source code in
any open language source code file.
2. Generate source code for selected definitions.
Run the DDL compiler interactively; open the dictionary and a language source
code file with the appropriate command; use an OUTPUT statement to specify the
definitions you want the DDL compiler to translate to source code. The DDL
compiler generates the code for the specified definitions and writes it to the open
language source code file. Close the language source code file before doing any
more interactive processing.