Hi folks,
I have recently encountered the following error during a proc sort step that I have been attempting to run. Please see below:
30 proc sort data=consolidatedextract;
31 by postal_code;
32 run;
ERROR: No disk space is available for the write operation. Filename =
C:\Users\*****\AppData\Roaming\SAS\EnterpriseGuide\EGTEMP\SEG-7108-f52f8208\contents\SAS Temporary
Files\SAS_util000100003FB4_PC045335\ut3FB4000019.utl.
ERROR: Failure while attempting to write page 62 of sorted run 4.
ERROR: Failure while attempting to write page 12128 to utility file 1.
ERROR: Failure encountered while creating initial set of sorted runs.
ERROR: Failure encountered during external sort.
ERROR: Sort execution failure.
Does anyone have any idea how to resolve this?
Many thanks,
You are running out of space in your WORK location.
Try to use the TAGSORT option (helpful when working with compressed datasets), or increase available space (remove data from WORK that is no longer needed, run the cleanwork utility to remove remnants of crashed SAS sessions).
That sounds a lot like an "out of space" message at heart. Delete any unneeded sets in your Work library.
You might try adding the option TAGSORT to the proc statement to reduce the size of the temporary utility files created when Proc Sort runs.
proc sort data=consolidatedextract TAGSORT;
Generally to run Proc SORT the work library has to have free disk space about 3 times the size of the data set being sorted because of the temporary utility files created while running.
You are running out of space in your WORK location.
Try to use the TAGSORT option (helpful when working with compressed datasets), or increase available space (remove data from WORK that is no longer needed, run the cleanwork utility to remove remnants of crashed SAS sessions).
Many thanks for your suggestions on this issue, I am struggling in figuring out how to use the cleanwork utility - do you have any tips with this function?
Thanks,
Its easy to manually delete anything not current in here: C:\Users\*****\AppData\Roaming\SAS\EnterpriseGuide\EGTEMP\SEG-7108-f52f8208\contents\SAS Temporary Files\
How to use cleanwork.
1) Identify where your SASHOME dir is. If you don't know, open Windows Explorer , select the drive where you think it is e.g. C drive, then in the search box enter "sas.exe"(With the Quotes). It should list at least one item and this should have a path similar to ..../SASFoundation/9.4/sas.exe in which case your SAS home is ..../SASFoundation/9.4
Open a Windows Command prompt
2) Change directory to the SASHome identified above. In my case my SAS is installed in a non standard location.
3) run the cleanwork tool with the /v (specifying C Drive in your case) and the /verbose option. See the screenshot for the syntax and how it looks on my machine:
As others have already stated this is a simple out of disk space error.
It looks like you're doing a fairly big sort as the sort procedure has started to use util as I see that the error is specifically for a SAS Util file
C:\Users\*****\AppData\Roaming\SAS\EnterpriseGuide\EGTEMP\SEG-7108-f52f8208\contents\SAS Temporary
Files\SAS_util000100003FB4_PC045335\ut3FB4000019.utl.
Other posters have offered solutions on how to clean up etc - cleanwork etc, I'll offer different workaround / solution:
If you are needing to work with bigger data volumes than what you have space for on your C:, do you have a second volume on your computer e.g. D:\ that has more space? If so, then you could start your SAS Session with options to point the WORK location and the UTILLOC (SAS Utilityfiles location) to a directory on the 😧
So typically, when running SAS in an environment that is set up to crunch bigger data - such as a server environment, you would have separate, high performance disk volumes for the Work and the UTIL. For example (windows)
W:\SASWork
U:\SASUtil
or Unix
/opt/saswork
/opt/sasutil
And often these are fairly sizeable disk volumes Say 500GB or 1TB and typically have high specs in terms of data throughput (think SSD or stripped volumes)
Anyway, in your case, I think you are using a workstation. If you have a 😧 or similar, I suggest looking into the -Work system option, see here: https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/hostwin/n1qr5dmzagn9krn1lt1c276963za.htm
and optionally the -UTILOC option: https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/lesysoptsref/p1texr4rxo0ipyn1ovajj11raccx.htm
HTH
Mark
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.