I\'d like to transpose a dataset, but SAS insists on adding a new column, if the \"by\" column has multiple entries.
So if I run
data test;
input a b
You can't use PROC TRANSPOSE in a single step with a 'mixed' dataset (multiple rows per by group AND multiple columns) to get long. Transpose only really works well going all one or the other.
Easiest way to get long is usually the data step.
data want;
set test;
array vars b c;
do _i = 1 to dim(vars);
varname = vname(vars[_i]);
value = vars[_i];
output;
end;
keep a varname value;
run;