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:
Содержание DDL D40
Страница 36: ...Introduction to DDL Data Definition Language DDL Reference Manual 426798 002 1 14 Examining a Dictionary ...
Страница 66: ...Named Constants Data Definition Language DDL Reference Manual 426798 002 4 10 Standard SPI Constants ...
Страница 230: ...Dictionary Manipulation Statements Data Definition Language DDL Reference Manual 426798 002 8 14 SHOW USE OF Statement ...
Страница 370: ...Dictionary Maintenance Data Definition Language DDL Reference Manual 426798 002 10 24 Converting a Dictionary ...
Страница 456: ...Sample Schemas Data Definition Language DDL Reference Manual 426798 002 B 12 ASSNDDL Statements ...
Страница 470: ...DDL Data Translation Data Definition Language DDL Reference Manual 426798 002 C 14 ...
Страница 528: ...Dictionary Reports Data Definition Language DDL Reference Manual 426798 002 E 8 Requesting Reports ...
Страница 552: ...DDL Alignment Rules Data Definition Language DDL Reference Manual 426798 002 H 4 FIELDALIGN_SHARED8 Alignment Rules ...
Страница 576: ...Index Data Definition Language DDL Reference Manual 426798 002 Index 22 Special Characters ...