BookmarkSubscribeRSS Feed
Kurt_Bremser
Super User

Ouch. You don't know this yet, but in SAS code like this:

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;

is a recipe for disaster. Complex joins of large tables cause SAS to create a utility file in WORK following the "everything including the kitchen sink", and that exceeds your storage. It also takes unnecessarily long.

 

In which tables are COL5 and COL7 contained?

Ksharp
Super User
Patrick has already given you the best solution .
a.k.a Change file "sasv9.cfg" .
If you can not change it . Try use option user like :

libname x v9 "d:\temp" ;
options user=x;
...........your sas code ............

But this only save your temp sas datasets in WORK into X .
The file utility sas datasets would not change .(I think SQL would generate this kind of utility datasets).

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

Register Now

Creating Custom Steps in SAS Studio

Check out this tutorial series to learn how to build your own steps in SAS Studio.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 16 replies
  • 5134 views
  • 10 likes
  • 7 in conversation