IBM AS/400 Frozen Dessert Maker User Manual


 
Using Externally Described Disk Files
*.. 1 ...+... 2 ...+... 3 ...+... 4 ...+... 5 ...+... 6 ...+... 7 ..*
A..........T.Name++++++.Len++TDpB......Functions++++++++++++++++++++*
A** LOGICAL CUSMSTL CUSTOMER MASTER FILE
A UNIQUE
A R CUSREC PFILE(CUSMSTP)
A TEXT('Customer Master Record')
A CUST
A NAME
A ADDR
A CITY
A STATE
A ZIP
A SRHCOD
A CUSTYP
A ARBAL
A ORDBAL
A LSTAMT
A LSTDAT
A CRDLMT
A SLSYR
A SLSLYR
A K CUST
Figure 139. Example of the Data Description Specifications for a Database File
The sample DDS are for the customer master logical file CUSMSTL. The file con-
tains one record format CUSREC (customer master record). The data for this file is
contained in the physical file CUSMSTP, which is identified by the keyword PFILE.
The UNIQUE keyword is used to indicate that duplicate key values are not allowed
for this file. The CUST field is identified by a K in position 17 of the last line as the
key field for this record format.
The fields in this record format are listed in the order they are to appear in the
record. The attributes for the fields are obtained from the physical file CUSMSTP.
The physical file, in turn, refers to a field-reference file to obtain the attributes for
the fields. The field-reference file is shown in Figure 140 on page 284.
Chapter 16. Accessing Database Files 283