Data Definition Language (DDL) Reference Manual
Running the DDL Compiler
Data Definition Language (DDL) Reference Manual—529431-004
3-4
Running the DDL Compiler Interactively
Running the DDL Compiler Interactively
To run the DDL compiler interactively, use the RUN DDL Command on page 3-1 and 
either:
•
Omit the run options IN and OUT.
•
Specify the same interactive terminal for both of the run options IN and OUT.
When run interactively, the DDL compiler:
•
Accepts all input from its home terminal
•
Sends all output to its home terminal
•
Executes any commands in the RUN DDL command before prompting you for 
input
•
Prompts you for input with the exclamation point (!)
You can enter any command or statement described in this manual. Begin a 
command with a question mark (?) and do not end it with a period (.).
•
Exits interactive mode when you either enter the EXIT statement or press the 
Ctrl-Y key
In Example 3-2 on page 3-4, assume that the dictionary dict exists on the current 
default volume and subvolume.
Example 3-2. Interactive DDL Session: Adding Structures to Existing Dictionary
2> DDL dict
Open dictionary dict.
!?COBOL cobsrc
Open (or create) COBOL source code file cobsrc to receive 
COBOL source code.
!?SOURCE newsrc
Compile statements in schema file newsrc, add compiled objects 
to dict, and write generated COBOL source code to cobsrc.
!EXIT
Exit the DDL compiler, returning to the command interpreter.
Example 3-3. Interactive DDL Session: Adding Structures to New Dictionary
27> DDL dict !
If dictionary dict exists on the default subvolume, open dict 
for update access and delete all the dictionary objects it 
contains; otherwise, create dict on the current default 
volume and subvolume.
!DEF cust-info.
! 02 name PIC X(25).
! 02 addr PIC X(40).
!END
Parse the DEFINITION statement as it is entered, ending with 
END.
Compile the DEFINITION statement and write production 
comments to the terminal.
!EXIT
Exit the DDL compiler, returning to the command interpreter.










