Data Definition Language (DDL) Reference Manual (G06.24+)
Running the DDL Compiler
Data Definition Language (DDL) Reference Manual—426798-002
3-4
Running DDL in Interactive Mode
Guidelines
Because errors are difficult to correct while you enter statements interactively, you 
should not try to enter an entire schema in interactive mode. Rather, you should 
specify a large source schema in an EDIT file, in which you can correct mistakes as 
you type. Then, when the schema is correct, specify the EDIT file in a DDL SOURCE 
command or in the IN run option of the DDL run command.
Interactive mode is best suited for functions that require only a few statements or 
commands, such as modifying an existing dictionary or generating source code from a 
dictionary.
Examples
In the following example of an interactive session, DDL adds new data structures to an 
existing dictionary from a source-schema file. Notice that DDL compiler commands are 
preceded by a question mark and are not ended by a period. The “n> ” construct is the 
TACL prompt for user input.
2> DDL dict
!?COBOL cobsrc
!?SOURCE newsrc
!EXIT
Assume that a dictionary already exists on the current default volume and subvolume. 
The preceding commands start a DDL process and instruct DDL to perform these 
operations:
•
Open a dictionary on the current default volume and subvolume.
•
Issue a prompt (!) for input from the terminal.
•
Open (or create) a COBOL source file named COBSRC to receive COBOL 
source code.
•
Compile the statements in the source schema file NEWSRC, add the compiled 
objects to the open dictionary, and write COBOL source code generated from the 
dictionary objects to the file COBSRC.
•
Exit from DDL, returning to the command interpreter.
In this second example of an interactive session, DDL adds a new definition to a newly 
created dictionary interactively.
27> DDL dict !
!DEF cust-info.
!02 name PIC X(25).
!02 addr PIC X(40).
!END
!EXIT
These commands start a DDL process and instruct DDL to perform the following 
operations:










