04-23-2013 02:41 PM
I have a dataset that I run through a PROC TRANSPOSE so that data is across rather than down.
As a result of this the number of resulting variables could be 1 to who knows how many - even our client
can't pin down the number of permutations that this will generate. (It is a reasonable number - most likely
less than 20).
Currently, the client report is generated with a PROC REPORT. The data coming from the transpose
is to be merged onto the data currently on the client report.
Is there some way to tell the PROC REPORT to include VAR1 - VARx ? Currently the PROC REPORT is
highly structured with define statements for each variable because the output uses ExcexXP.
Thanks in advance.
04-23-2013 04:20 PM
This is probably a little simple-minded for your purposes, but it does in fact work (9.3 TS1M2 on Win 7), assuming your variables out of Transpose are similarly-named.
input id x1 x2 x3;
1 1 2 3
2 4 5 6
3 7 8 9
proc report data=one nowd;
columns id x:;
define id / order;
define x: / display;
04-23-2013 05:34 PM
I've often wondered why the DEFINE statement supports the "SAS Variables List" but not the "List of SAS Variables". :smileygrin: