Reinhardt: I have included the code and the log. I modified as per your suggestion but it does not give me any obs as seen in the log. SInce i am dividing in the last step I wanted data without any zeros or miss val. all the 3 data sets have the values. data totalteachers (keep = School County Teachers); set impute_mid_schools impute_high_schools; Total_Teachers=sum(of Teacher_mid Teacher_high); Teachers =ceil(Total_Teachers); run; data totalstudentsgrd7togrd12; set impute_mid_schools impute_high_schools totalteachers; if Teacher_mid>0 and Teacher_high>0; Total_Students_grd7togrd12=sum(of mid_Grd7-mid_Grd12)+sum(of hs_Grd7-hs_Grd12); retain PTRatio_rev 0; PTRatio_rev=Total_Students_grd7togrd12/Teachers; format PTRatio_rev 9.2; run; log NOTE: There were 610 observations read from the data set WORK.IMPUTE_MID_SCHOOLS. NOTE: There were 459 observations read from the data set WORK.IMPUTE_HIGH_SCHOOLS. NOTE: There were 1069 observations read from the data set WORK.TOTALTEACHERS. NOTE: The data set WORK.TOTALSTUDENTSGRD7TOGRD12 has 0 observations and 24 variables. NOTE: DATA statement used (Total process time):
... View more