Just to clarify, what about the result data set is not what you want? The variable names in the new data set will be placed on the PDV in ascending order. Using sashelp.shoes I tried your code:
[pre]proc sort data= sashelp.shoes out=shoes;
by subsidiary product;
run;
proc transpose data=shoes out=wide2(drop=_name_);
id product;
by subsidiary;
var sales;
run; [/pre]