data prob1;
infile 'C:\capital.txt';
input num 1-8 rk $ 9-18 rv $ 19-30 death $ 31-33;
run;
data z;
set prob1;
dth=trim(upcase(death));
if dth = 'YES' then count =1;
else if dth ='NO' then count =0;
proc freq;
tables rk*rv/ Chisq;
proc freq;
tables death*rk*rv;
run;