Sample Schemas
Data Definition Language (DDL) Reference Manual — 426798-002
B- 6
Database Schema Listing
MAXEXTENTS 100.
DEFINITION IS orderinfo.
KEY IS orders.ordernum DUPLICATES NOT ALLOWED.
KEY "sn" IS orders.salesperson.
KEY "cn" IS orders.custnum.
END
* Contains each order line for each order
RECORD odetail.
FILE IS "$data.sales.odetail"KEY-SEQUENCED
AUDIT
MAXEXTENTS 100.
02 primkey.
03 ordernum TYPE *.
03 partnum TYPE *.
02 quantity PIC 9(3).
KEY IS primkey DUPLICATES NOT ALLOWED.
END
* Contains information on each part
RECORD parts.
FILE IS "$data.sales.parts"KEY-SEQUENCED
AUDIT
MAXEXTENTS 100.
DEFINITION IS partsinfo.
KEY IS parts.partnum DUPLICATES NOT ALLOWED.
KEY "pn" IS parts.partname.
END
* Contains a record of each part ordered from each supplier
RECORD fromsup.
FILE IS "$data.sales.fromsup"KEY-SEQUENCED
AUDIT
MAXEXTENTS 100.
02 primkey.
03 partnum TYPE *.
03 suppnum TYPE *.
02 partcost PIC 9(6)V9(2)
DISPLAY part-cost-
display.
KEY IS primkey DUPLICATES NOT ALLOWED.
END
* Contains information about each supplier of parts
RECORD supplier.
FILE IS "$data.sales.supplier" KEY-SEQUENCED
AUDIT
MAXEXTENTS 100.
DEFINITION IS suppinfo.
KEY IS supplier.suppnum DUPLICATES NOT ALLOWED.
KEY "su" IS supplier.suppname.
END
* Contains information about company's regional offices
RECORD region.
FILE IS "$data.sales.region" KEY-SEQUENCED