IBM AS/400 Frozen Dessert Maker User Manual


 
Methods for Processing Disk Files
limits record. If the two limits supplied by the record-address file are equal, only
the records with the specified key are retrieved.
The program repeats this procedure until the end of the record-address file is
reached.
Examples of Sequential-within-Limits Processing
Figure 152 on page 302 shows an example of an indexed file being processed
sequentially within limits. Figure 154 on page 303 shows the same example with
externally described files instead of program-described files.
Figure 144 on page 294 shows the data description specifications (DDS) for the
physical file used by the program ESWLIM1 ( Figure 152 on page 302) and
ESWLIM2 ( Figure 154 on page 303).
EXAMPLE PROGRAM 1 (Sequential-within-Limits Processing):
EMPMST is
processed sequentially within limits (L in position 28) by the record address file
LIMITS. Each set of limits from the record-address file consists of the low and high
employee numbers of the records in the EMPMST file to be processed. Because
the employee number key field (ENUM) is five digits long, each set of limits con-
sists of two 5-digits keys. (Note that ENUM is in packed format, therefore, it
requires three positions instead of five.)
Chapter 16. Accessing Database Files 301