BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
jkim197
Obsidian | Level 7

 

I want to merge two dataset using PROC SQL

First dataset is only 400MB and second one is 170MB

 

However, if I merge two, I got messages "OUT OF RESOURCES " Disk Full

Currently I got 300GB of local disk space and both datasets are not in work library and of course I the merged dataset is 

to be create in other library that is located in local disk.

 

Why is this happens???

 

Can anyone help?

 

1 ACCEPTED SOLUTION

Accepted Solutions
RW9
Diamond | Level 26 RW9
Diamond | Level 26

SQL can be more resource hungry as it does internal sorts/merges etc.  Can't really tell much from the bit of information you posted.  Try doing a datastep merge, or debugging the SQL.

 

Do also note that resources could refer to physical memory, not just hard disc space.  You might need to extend the amount of ram allocated to SAS, or install more.  Again, its still hard to say as no information.

View solution in original post

2 REPLIES 2
RW9
Diamond | Level 26 RW9
Diamond | Level 26

SQL can be more resource hungry as it does internal sorts/merges etc.  Can't really tell much from the bit of information you posted.  Try doing a datastep merge, or debugging the SQL.

 

Do also note that resources could refer to physical memory, not just hard disc space.  You might need to extend the amount of ram allocated to SAS, or install more.  Again, its still hard to say as no information.

Kurt_Bremser
Super User

Please show the SQL code (and the whole log from the step). An accidental unconditional cartesian join of two datsets like this can easily result in a multi-terabyte output.

 

And keep in mind that a SQL join will use lots of space in your work (and/or UTILLOC, which is by default in WORK) anyway, no matter where the source and result tables are located. So if you do not have at least the size of both tables combined available in your work, the SQL will unvariably fail.

 

My personal preference is to always do joins in datasteps, unless I really do need to build a cartesian join, which is easier done in SQL.

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

How to Concatenate Values

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 5061 views
  • 0 likes
  • 3 in conversation