You're "simply" running out of space in the WORK library. First step: clean up yourself. Either remove unneeded datasets from WORK, or restart SAS altogether (that removes the WORK library physically).
If that does not remedy your problem, consider increasing available space in WORK, or at least use another library for your source and target datasets that resides on other storage.
PRC SQL does build a very large utility file while working, which might be the cause for your problem; since you get the error when writing the result dataset, at least building the utility file seems to have worked.
Create a new library that is physically on another file system, and store your have and want datasets there; then only the intermediate file(s) automatically created by proc sql need space in WORK.
Or increase the size of the filesystem where WORK is located.
@ihlayyel wrote:
Thank you so much for your reply. I have created another library and move the files there. The work library is empty, but its not working.
If you really moved your files to a different filesystem (and not just another directory on the same FS), then you need to increase space for your WORK.
Also run the cleanwork utility on your WORK location.
Firstly , the code of mine is getting what you want?
If it was, then your original data is not like what you posted, can you post your real data and the output of
PROC CONTENTS DATA=PEOPLE;RUN:
Hello, yes your code is working on small size of the data. However, when i run it on all the dataset I get this issue.
This is the output of the run
PROC CONTENTS DATA=PEOPLE;RUN:
find the attachments for full results
WORK.PEOPLE | 1048575 |
DATA | 7 |
V9 | 0 |
11/11/2017 14:40:26 | 56 |
11/11/2017 14:40:26 | 0 |
NO | |
NO | |
SOLARIS_X86_64, LINUX_X86_64, ALPHA_TRU64, LINUX_IA64 | |
utf-8 Unicode (UTF-8) |
Use another folder to replace WORK.
libname x v9 'd:\temp\';
options user=x;
data want;
set people;
.............
after running code, you can find WANT table in USER library.
Thank you for your reply.
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;
-----------
If your OS is linux or unix ,let OS administrator create a folder for you like : /home/xxx/temp/ ,and make sure there is enough disk space.
libname x v9 ' /home/xxx/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;
run;
Hi, it works and I got the results.
Thank you so much for your suggestion 🙂
Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.