For a beginner, PROC TRANSPOSE is not easy. In this case, it's harder because you have to prepare your data before PROC TRANSPOSE can be applied. Two simple preparatory steps ...
First, create a variable holding the names to be used after transposing:
data partway_there;
set gc_sgrp_breakout;
varname = scan(sgrp_dscr, 1);
run;
You can take a look at VARNAME, and expect to use it in an ID statement within PROC TRANSPOSE.
Second, sort your data (if it's not already sorted):
proc sort data=partway_there;
by hshld_no;
run;
This permits you to use a BY statement within PROC TRANSPOSE.
Finally, head into the PROC TRANSPOSE:
proc transpose data=partway_there out=want;
by hshld_no;
id varname;
run;
You will have to add to that final TRANSPOSE to get it to function the way you would like.
... View more