Converting variable-length records to fixed-length records