A function of the operating system used to arrange records in a sequence determined by data contained in one or more fields in the record.