Hi All:
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.
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.
data one;
input id x1 x2 x3;
datalines;
1 1 2 3
2 4 5 6
3 7 8 9
;;;;
run;
proc report data=one nowd;
columns id x:;
define id / order;
define x: / display;
title "Tester";
run;
HTH,
Karl
I've often wondered why the DEFINE statement supports the "SAS Variables List" but not the "List of SAS Variables". :smileygrin:
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.