Hi! I have 8 different data set, 4 quarter data set from individual level and 4 quarter data set from household level. I would like to combine all these data set into one. Previously I'm using this code: *For Individual data work.i07; set hw.i071(in=m071) hw.i072(in=m072) hw.i073(in=m073) hw.i074(in=m074); if m071=1 then qtr=1; else if m072=1 then qtr=2; else if m073=1 then qtr=3; else if m074=1 then qtr=4; run; *For Household data work.f07; set hw.F071(in=f071) hw.F072(in=f072) hw.F073(in=f073) hw.F074(in=f074); if f071=1 then qtr=1; else if f072=1 then qtr=2; else if f073=1 then qtr=3; else if f074=1 then qtr=4;\ run; *Merging both data hw.all07; merge work.f07 work.i07p; by CU_ID; run; That code works, but I wonder if there is any simple code to do it. Perhaps using single data step instead using multiple step. Thank you.
... View more