Sort the activities data set by the variables containing the calendar identification and the starting date, respectively.
You are not required to sort the holidays data set.
proc sort data=well.act; by _cal_ date; run;