data stud_Pri (keep =HSE_ID HH_NO Hsehold_Ref_No PriStd_cnt); set stud_dev; by Hsehold_Ref_No; if first.Hsehold_Ref_No then do; where LVL_OF_EDN in ('0', '1'); PriStd_cnt=0; end; PriStd_cnt + 1; if last.Hsehold_Ref_No then output; run; I don't understand this code. If first.Hsehold_Ref_No then do; where LVL_OF_EDN in ('0', '1'); PriStd_cnt=0;end; 1) What if the first.Hsehold_Ref_No doesn't have LVL_OF_EDN in ('0', '1')? What will SAS do? 2) If the LVL_OF_EDN in ('0', '1') is in the 2nd or beyond record of the same Hsehold_Ref_No, will SAS count it? Thank you
... View more