How about this example? I only use two data sets, temp1 and temp2, and in fact the data and percents are identical, but the point is to illustrate the method.
data temp1;
input activity $ location $ item $;
datalines;
A IC V
A ID R
B IR W
C IC R
A IR W
C IC V
B ID V
;
RUN;
data temp2;
input activity $ location $ item $;
datalines;
A IC V
A ID R
B IR W
C IC R
A IR W
C IC V
B ID V
;
RUN;
data all;
/* Note: if you really have 200 data sets, just use temp1-temp200 below */
/* or whatever the real names are */
set temp1-temp2 indsname=indsname;
file=propcase(scan(indsname,2,'.'));
run;
proc freq data=all;
by file;
tables activity/out=act;
tables location/out=loc;
tables item/out=item;
run;
data all2;
length characteristic activity location item $30;
set act loc item;
if not missing(activity) then activity=catx('~',"Activity",activity);
if not missing(location) then location=catx('~','Location',location);
if not missing(item) then item=catx('~','Item',item);
characteristic=coalescec(activity,location,item);
run;
proc report data=all2 split='~';
columns ("File~Name" file) ("Percent" percent),characteristic;
define file/group ' ';
define characteristic/across ' ';
define percent/sum ' ' format=8.2;
run;
Please note that it is always a good idea to make the table easily readable by your intended audience. This includes using capital letters and English words. Using per_ic, which is not an English word and is not capitalized, is not as clear and readable as Percent Location IC which uses English words and has capitalized words. Note also File Name has capitalized file names and English words (filename is not really an English word). Furthermore, if R V W for Items have actual names or values, these should appear in the table as well. Activity should not be A B C but rather the actual English word names that A B C represent. And so on. Make the table readable!!
... View more