Data Definition Language (DDL) Reference Manual

DDL Compiler Commands
Data Definition Language (DDL) Reference Manual529431-004
9-100
SOURCE
section-name
is the name of a section within the schema file. (Section names are specified with
the command SECTION on page 9-96.)
If you specify one or more sections, the DDL compiler compiles only the specified
sections.
If you do not specify sections, the DDL compiler compiles the entire schema.
A schema file is an EDIT file that contains DDL statements and commands; it can be
either a file created with the EDIT program or a DDL source code file created with the
DDL command.
If you specify more than one section, the sections are compiled in the order they occur
in the source code file.
A single SOURCE command can extend over more than one input line. The first line
begins with SOURCE, and each subsequent line begins with a question mark.
schema files can be nested; that is, schema A can contain a SOURCE command
specifying schema B, and schema B can contain a SOURCE command specifying
schema C.
If the DDL compiler is compiling a schema file and it encounters a SOURCE command
in that file, the DDL compiler:
1. Suspends compilation of the current file.
2. Opens the file specified in the SOURCE command and compiles either the entire
file or the specified sections.
3. Includes the compiled file (or sections) in the current file at the point where it
encounters the SOURCE command.
4. Resumes compiling the current file.
In Example 9-51
on page 9-100, the DDL compiler opens a new DDL source code file
called NEWSRC. The DDL compiler first compiles all of FILE1 and writes it to
NEWSRC; then compiles SECT-1 and SECT-3 of FILE2 and appends them to the
contents of NEWSRC; and lastly, compiles SECT-1 and SECT-5 of FILE3 and
appends them to the end of NEWSRC.
Example 9-51. SOURCE Command
45> DDL
!?DICT
!?DDL newsrc
!?SOURCE file1
!?SOURCE file2 (sect-1, sect-3)
!?SOURCE file3 (sect-1,!
sect-5)
!EXIT
Continuation line