07-20-2016 10:58 PM
I have a DELL laptop computer with Windows 10 running a university edition of SAS that is downloaded onto the computer (I am not linked to a mainframe). I am using 64 bit SAS 9.4.TS 1M3. I may run it in Enterprise Guide 7.12 HF3 (126.96.36.19944) (64-bit).
I am getting an out of memory error.
I think that the problem is that the SAS code is constructing a very large array. The data set is not particularly large (7 columns by 53000 rows). I have not entirely given up on the idea that it is a programming error, but it is hundreds of lines of code. However, I can get it to run on a smaller data set.
How do I allocate more memory to SAS?
07-20-2016 11:47 PM
Run your program with the SAS option fullstimer and the log will contain memory usage statistics for the step that failed. Compare that with the amount of memory your PC has.
You may also need to adjust the SAS memsize option if it is smaller than your PC physical memory. Run PROC OPTIONS to confirm this setting.
07-22-2016 12:32 PM
I tried, but it didn't seem to recognize the command. When I look at the SAS documentation for this command it seems like it is only for SAS running on a server. I am running on a PC. I hit a button "run" and I don't see how to use the command.
Thank you for help.
07-22-2016 12:34 PM
The version that I am running is the SAS Education Analytic Suite. Is this the same as the University Edition? Does it have a memory limitation?
Thank you for your help.
07-21-2016 01:15 AM
07-22-2016 12:44 PM
I do not expect the forum to sift through hundreds of lines of code. It is possible that the program could be made more efficient, but this is irrelevant for today. All I know is that I cannot acomplish that task in the allotted time frame. I might (with help) be able to solve the out of memory issue.
I am running SAS Education Analytic Suite. SAS 9.4 TS1M3. Is this the University Edition that is only for small data sets?
Thank yoy for helping.
Data never sleeps, but the dragons that guard it sometimes do. And the glowing red eyes in the dark, watch, and bide their time.
07-22-2016 06:06 PM
Are you running SAS Studio - ie accessing it through a web browser or Base SAS?
If it's Base SAS you can play around with the MEMSIZE options and/or change the work library.
A quick workaround to change the work library is to assing a USER library as that apparently overwrites the WORK library. I'm not sure that will work for where it stores temp stuff.
You need to check your configuration file for the MEMSIZE option.
Here's the link for EG, but the settings are the same for BASE:
07-22-2016 05:13 PM
09-01-2016 09:15 AM
To all who tried to help. Thank you.
While none of the posts actually worked (as posted) they pointed me in a direction that solved the problem as much as possible. The end result was that 31 errors got reduced to 2 errors and I was able to show that the program used so much memory that it would never run with the computers that we have. This is likely a program that uses memory inefficiently, but that is an entirely different issue. The out of memory issue was solved to the extent possible, and that is all that I can hope for in this case.
With your posts I was able to ask SAS Technical support the right questions. I have posted the solution here, but it does require administrative privledges on the computer. In my case, my first attempt to change the files was denied. After IT showed me what to do, I could have done it all myself if I had known what to do in the first place.
The MEMSIZE option cannot be set within a SAS program. You can set this option in your startup command or in your sasv9.cfg file. See the instructions below to set the MEMSIZE value in your sasv9.cfg file.
First, make sure that you have a 64-bit version of SAS by running the following code in SAS:
%PUT Architecture: &SYSADDRBITS;
The log window should have the following output:
If you have 32-bit version of SAS, the memory limit is 2GB, and this cannot be increased unless you upgrade to 64-bit SAS.
To change the memory limit in SAS 9.4, follow these steps:
1. Navigate to C:\Program Files\SASHome\SASFoundation\9.4\nls\en and open the sasv9.cfg file in Notepad.
2. Edit the "-MEMSIZE" value in your SASV9.cfg file.
This sets the memory limit of SAS to 8GB. The MEMSIZE system option specifies the total amount of memory available to each SAS session. A value that is too low will result in out-of-memory conditions. SAS does not automatically reserve or allocate the amount of memory that you specify in the MEMSIZE system option. SAS will use only as much memory as it needs to complete a process. For example, a DATA step might require only 20M of memory, so even though MEMSIZE is set to 500M, SAS will use only 20M of memory.
You can find more information on the memsize option here: http://support.sas.com/documentation/cdl/en/hostwin/67241/HTML/default/viewer.htm#n0srij4mcdpzv2n1vt....
SAS Technical Support
Windows Business Intelligence
Certified SAS 9 Platform Administrator