proc_sort function

Sorts a dataset