HP DDL D40 Reference Manual page 226

Data definition language
Table of Contents

Advertisement

Dictionary Manipulation Statements
The resulting source code from MYFILE follows:
?Section ZIP-CD-DELETES
Delete Record SUPPLIER.
Delete Record CUSTOMER.
Delete Definition SUPPINFO.
Delete Definition CUSTINFO.
Delete Definition ADDR.
?Section ZIP-CD
Definition ZIP-CD PIC "9(9)".
?Section ADDR
Definition ADDR.
02 ADDRESS PIC "X(22)".
02 CITY PIC "X(14)".
02 STATE PIC "X(12)".
02 ZIP TYPE ZIP-CD.
End
?Section CUSTINFO
Definition CU STINFO.
02 CUSTNUM TYPE *.
02 CUSTNAME TYPE NAME.
02 ADDR TYPE *.
End
?Section SUPPINFO.
Definition SUPPINFO.
02 SUPPNUM TYPE *.
02 SUPPNAME TYPE NAME.
02 ADDR TYPE *.
End
?Section CUSTOMER
Record CUSTOMER.
File is "$data.sales.customer" Key-sequenced
Audit.
Definition is CUSTINFO.
• Key is CUSTNUM duplicates not allowed.
Key "cn" is CUSTNAME.
End
?Section SUPPLIER
Record SUPPLIER.
File is "$data.sales.supplier" Key-sequenced
Audit.
Definition is SUPPINFO.
Key is SUPPNUM Duplicates not allowed.
Key "su" is SUPPNAME.
End
Note. The order in which the objects are deleted and added is important. Any other order can
cause DDL to issue an error message.
Data Definition Language (DDL) Reference Manual—426798-002
First section deletes all
objects that refer to ZIP-
CD
Second section defines
new ZIP-CD with new
length of 9 digits
Subsequent sections
contain definitions to
rebuild deleted objects
VST808.vsd
8- 10
OUTPUT UPDATE Statement

Advertisement

Table of Contents
loading

Table of Contents