Thank you for your reply. Let me explain something. When I run the code separately, i manage to generate table have successfully. When i want to do the grouping part using SQL i face the sapce issue. I have follow ur comment. But, when i run this code i got this error: libname x v9 'c:\temp\'; options user=x; data want; set people; retain _time ; format time _time time8.; if _n_=1 then _time=time; if time > _time+20*60 then do; group+1; _time=_time+20*60; end; --- proc sql; create table want as select catx(',',a.uid,b.uid) as id, catx(',',a.floor,b.floor) as floor,Euclid(a.x-b.x,a.y-b.y) as distance from have as a, have as b where a.floor=b.floor and a.uid ne b.uid and a.group=b.group; quit; ----------- 1 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK; 61 62 libname x v9 'c:\temp\'; NOTE: Library X does not exist. 63 options user=x; ____ 8 ERROR 8-7: Library USER does not exist. 64 65 data want; -----------------------
... View more