Qualifying and sorting file record data
摘要:
Record data on a disk file is sorted in a text/data processor by means of an algorithm that transfers such records on the basis of rank to a sort buffer on the basis of qualifying criteria. Each qualified file record is compared with the lowest ranked record previously transferred and located in the sort buffer. When a higher ranked record is identified it is transferred into the buffer at a location based on qualification. Lower ranked records are deleted from the sort buffer if space does not permit the storing of such records within the space available. When the sort buffer has been loaded with the highest ranked records remaining in the disk file without overflowing the buffer is unloaded to an output device. The sort program recycles through a subsequent pass again transferring the highest ranked remaining records into the sort buffer. To minimize recycle time, a presort algorithm is run to set record identifying bits in a bit map section of the sort buffer. Each time the contents of the sort buffer is output the record identifying bits for the records in the sort buffer are reset to a second state. The second state of a record identifying bit indicates that that record will not be considered for future passes through the sort routine.
公开/授权文献
信息查询
0/0