/**********Import Data**************/ PROC IMPORT OUT= WORK.DEMO DATAFILE= "C:\temp\data.xls" DBMS=EXCEL2000 REPLACE; GETNAMES=YES; RUN; /***************************************/ proc contents; run; proc means; run; proc freq; tables ethnicity gender; run; proc freq; tables age; run; proc freq; tables gender*ethnicity / chisq expected ; run; /******Calculate New Variables***************/ data demo2; set demo; if diastolic >=85 then hidbp=1; if diastolic <85 then hidbp=2; if diastolic = . then hidbp = .; if age = . then delete; run; proc freq; tables gender * hidbp / relrisk; run;