This preview shows page 1. Sign up to view the full content.
Unformatted text preview: ut parameters, varies from one sorting
utility to another. These parameters decide the extent and sophistication of sorting
utilities. A sorting utility enables users to sp6cify their particular sequencing
requirements by means of simple parameters. The user specifies the sort keys, and
also details about the type of file such as storage device, file labels, record
structure. The sorting utility reads the unsequenced input file, and by means of
various copying techniques ultimately produces an output file, which contains the
records of the input file ordered in the required sequence.
A file searching utility is used to find a particular record from a file. The searching
is carried out with respect to certain specified fields (known as keys) within the
record. For example, in the employee file of Figure 16.4, the user can specify the
value 202 for the employee code field to request the computer to search the
corresponding employee's record.
The efficiency of a search algorithm depends on the file organization. For
example, to search a particular recon in a sequential file, the file is scanned
sequentially beginning with the first record and the specified key i compared oneby-one with the key field of each record. The search process terminates when the
record with the matching key is found. On the other hand, direct or index
sequential file organizations enable immediate access to the desired record with
the help of either the hashing algorithm (in case of direct file organization) or the
index file (in case of index sequential file organization). The user needs to only
specify the file and the key, and the searching utility searches through the file and produces the desired record. Normally, the time required to search a particular
record from a direct or index sequential file is much less as compared to the time
required to search it from a sequential file.
A file merging utility is used to combine the records of two or more ordered
(sorted) files into a si...
View Full Document
This document was uploaded on 04/07/2014.
- Spring '14