Data Definition Language (DDL) Reference Manual

Data Definition Language (DDL) Reference Manual529431-004
B-1
B Sample Schemas
Sample Database Schema on page B-1
Sample SPI Schema on page B-6
Sample Database Schema
The sample database schema defines a database consisting of nine files. The
database files are defined in RECORD statements that refer to previous DEFINITION
statements for their record structures. Many of the individual and group fields within
each record also refer to previous DEFINITION statements. All DISPLAY and
HEADING values in DEFINITION statements are defined in previous CONSTANT
statements.
When the DDL compiler compiles this schema, the DDL compiler builds a dictionary
and generates two source code files:
Topics:
Host-Language Source Code on page B-1
Database Schema Listing on page B-2
Host-Language Source Code
A COBOL program that accesses the database can use the COBOL source code in
COBSRC as its Data division. C, FORTRAN, Pascal (on D-series systems), pTAL,
TACL, and TAL source code can also be generated for this schema. For C and TACL,
the DDL compiler issues warning messages when generating the source code. For C,
two data items (PRICE and PARTCOST) are described with PICTURE clauses that are
not supported by C. For TACL, three data items (INVENTORY, PRICE, and
PARTCOST) are described with unsupported PICTURE clauses. The DDL compiler
generates compatible C and TACL data types for these items.
For Pascal, pTAL, and TAL, there are data items that contain unsupported data types,
but these languages do not issue warning messages. For Pascal, PRICE and
PARTCOST are described with PICTURE clauses that are unsupported. For pTAL or
TAL, INVENTORY, PRICE, and PARTCOST are described with unsupported
PICTURE clauses.
Source Code File Description
FUPSRC A FUP file-creation source file that contains the FUP commands to
create each file described in the schema.
The database is created only when FUP is executed with this file as
input.
COBSRC A COBOL source file that contains COBOL data descriptions for all
the fields, groups, and records in the schema.