It turns out that running the PROC SORT first in this case saved me about 60% of time, as compared to the Option 1 I had. When I ran Option 1, it took a total of about 3 hours to complete, whereas the lines below finished within 1 hour. I haven't compared it with Option 2 yet, but I suspect it will be comparable. Because the individual state data sets are all sorted by the same variables, I could just do: proc sort data = master
out = master_sorted;
by var1 var2;
run;
data NC SC GA FL;
set master_sorted;
if state = "NC" then output NC;
if state = "SC" then output SC;
if state = "GA" then output GA;
if state = "FL" then output FL;
run; Thanks again for your input! -AH
... View more