Post your log to SAS-L. The code you provided doesn't result in the error
On Thu, 19 Mar 2009 14:13:05 -0700, FPAStatman <brentvtimothy@GMAIL.COM>
>I have run into an interesting error, which I cannot figure out how to
>solve. I will provide an example of what I am doing below:
>INPUT name $ id;
>INPUT name $ input;
>PROC SORT data=a;
>PROC SORT data=b;
>MERGE b a;
>This is a simplification of the process, but basically the same. I
>then get an error saying:
>ERROR: BY variables are not properly sorted on the dataset user.a.
>Why are they not properly sorted after a sort statement? There is no
>error in the sort statment, and it says that SAS sort was used.