I'm running SAS EG 7.1 on a Citrix machine at work. I'm trying to do a very large sql pull (50gb) and keep running out of disk space. Our server drive has plenty of storage, so I assume switching the working directory to a folder on that drive temporarily will avoid this error?
The error says "*insufficient disk space....file is damaged. I/O processing did not complete. You may be able to execute sql statement successfully if you allocate more space to the WORK library."* I don't seem to have access to the config file and I've tried to change it programmatically with no luck. I am trying to save the resulting dataframe to a server folder already with a LIBNAME statement, but I think the temporary files created in WORK during the process are too much to handle. It seems the DLGCDIR function, that would help with this, starting with SAS 9.4 doesn't work with EG 7.1. Any help?
I've tried both:
x 'cd "Q:\folder"';
and
data _null_;
rc = system( 'cd "Q:\folder"' );
if rc = 0
then putlog 'Command successful';
else putlog 'Command failed';
run;
These run fine, but in the log it still says my working directory is unchanged:
SYMBOLGEN: Macro variable SASWORKLOCATION resolves to "C:\Users\user\AppData\Local\Temp\SEG5432\SAS Temporary
Files\citrixMachineDrive\Prc2/"
Here is my simplified SAS code. I am using UNION on several datasets in my Q server drive folder (TB's of space) within the FROM statement (50GB total). I'm then left joining on a smaller dataset from the database and saving the resulting dataset to the Q drive folder. This was code that was previously run on a weekly/monthly basis, but now we want a full year of data. Worse case scenario is I rework the related code into PySpark, but I was hoping to get this done quickly and that will take me some time.
LIBNAME PCLIB = 'Q:/folder';
PROC SQL FULLSTIMER;
CREATE TABLE PCLIB.NEED (COMPRESS=ON) AS
SELECT
A.COL1,
CASE WHEN B.COL2 NE '' THEN B.COL2 ELSE A.COL3 END AS COL4,
SUM(COL5) AS COL6,
SUM(COL7) AS COL8
FROM (SELECT * FROM PCLIB.TABLE1 UNION
SELECT * FROM PCLIB.TABLE2 UNION
SELECT * FROM PCLIB.TABLE3 UNION
SELECT * FROM PCLIB.TABLE4 UNION
SELECT * FROM PCLIB.TABLE5 UNION
SELECT * FROM PCLIB.TABLE6
) AS A
LEFT JOIN TABLE_db B ON A.ID=B.ID
GROUP BY
COL1,
COL4;
QUIT;
... View more