06-01-2017 05:29 AM
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?
06-01-2017 05:43 AM - edited 06-01-2017 05:44 AM
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.
06-01-2017 07:19 AM
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.