Not completely sure why, but this mod seems to work. Thanks !!! Proc Tabulate - Using a character variable in the VAR Statement proc format library=work;
invalue mtype
'@' = 1
'&' = 2
'%' = 3
;
value mtype
1 = '@'
2 = '&'
3 = '%'
;
run;
data wantdev3;
informat myname mtype.;
format myname mtype.;
do rows = 'aaa', 'bbb', 'ccc', 'ddd';
do cols = 'eee', 'fff', 'ggg';
if cols in ('fff', 'ggg') and rows = 'bbb' then myname = 1;
else myname= 2;
output;
end;
end;
run;
proc tabulate data=wantdev3 ;
var myname;
class rows cols;
table rows, cols*myname=' '*sum=' '*f=mtype.;
run;
... View more