Looks like you have it figured out yourself by using a classic data step way. Although I think it is worth mentioning that for this kind of task, SQL seems to have a native edge, as SQL join generates Cartesian products to start with. proc sql; create table c as select * from a,b; quit; BTW, with the advent of Hash(), data step has been granted the similar power as SQL join: data c (drop=_:); if _n_=1 then do; set a (obs=1); dcl hash h(dataset:'a', ordered:'a'); h.definekey(all:'y'); h.definedone(); dcl hiter hi('h'); end; set b; _rc=hi.first(); do while (_rc=0); output; _rc=hi.next(); end; run; Kindly regards, Haikuo
... View more