Dear all, I need help with programming. I am a new sas user. I am matching 2 big data base for a case control study, with 4 controls for each cases and the control is only can be use once. My case table consist of 65,000 observations with 3 variables ID, sex and age. My control table consist of 7,000,000 observation and 4 variables ID, sex,age_hi and age_lo. I use the procedure below: Proc sql; Create table caco as Select a. ID as case_ID, b. ID as control_ID, a. sex as case_sex, b. sex as control_sex, a.age as case_age, b. age as control_lopnr from case_table a, control_table b where (a.sex=b.sex and (a.age between b.age_lo and b.age_hi)) order by case_ID, control_ID; quit; This part took almost 13 hours, and I have to do this part several times since 1 run only give me less than 400 controls. I think the randomization process that took long time, since the match variable is only sex and age. I used the same program for the same tables before, but with many more match criteria and it took me only max less than 2 hours. I guess I need to use hash table, but to be honest I don’t know how to do it. Can somebody help me? Any help will be appreciated. /cantika
... View more