Help using Base SAS procedures

ERROR: Not enough memory available to allocate storage.

Reply
New Contributor
Posts: 3

ERROR: Not enough memory available to allocate storage.

Hello everyone,

 

I am trying to import a sheet from an excel file. However, it gave me this error message.

Here is what I did:

------------------------------------------

libname SAStry cvp "/folders/myfolders/Jobs";
proc import datafile='/folders/myfolders/Jobs/AE.xls'
    out=SAStry.allsae dbms=xls;
    sheet="sae";
run;

------------------------------------------

Log file:

1 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
55
56 libname SAStry cvp "/folders/myfolders/Jobs";
NOTE: Libref SASTRY was successfully assigned as follows:
Engine: CVP
Physical Name: /folders/myfolders/Jobs
57 proc import datafile='/folders/myfolders/Jobs/AE.xls'
58 out=SAStry.allsae dbms=xls;
59 sheet="sae";
60 run;
 
Memory request error
ERROR: Not enough memory available to allocate storage.
NOTE: The SAS System stopped processing this step because of errors.
NOTE: PROCEDURE IMPORT used (Total process time):
real time 0.25 seconds
cpu time 0.27 seconds
 
61
62 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
74
--------------------------------------------------------
I used CVP engine to avoid the data truncated since this excel file contains information in different languages.
I tried google this error message or tried to increase memory in the vmware player setting. So far nothing worked.
 
Could anyone please give me some help/hints? Thank youSmiley Happy
 
Lei
Trusted Advisor
Posts: 1,606

Re: ERROR: Not enough memory available to allocate storage.

Basically, your computer does not have enough memory to perform this task.

 

You can try rebooting your computer and making sure that the only application running is SAS.

 

But the long term fix is most likely that you need more memory in your computer AND a 64-bit operating system.

New Contributor
Posts: 3

Re: ERROR: Not enough memory available to allocate storage.

Thank you for the quick reply, PaigeMiller.

 

I will try the reboot and see how it will turn out. My OS is windows 10 X 64 bits by the way. 

 

 

Contributor hbi
Contributor
Posts: 66

Re: ERROR: Not enough memory available to allocate storage.

Do you use Enterprise Guide or Regular SAS? 

 

This article ( http://support.sas.com/kb/31/715.html ), though slightly dated, states that in the absence of a hotfix, "DBMS=EXCEL" should be used instead of "DBMS=XLS". 

 

Also, are you using "OPTIONS COMPRESS=YES;"? This option is absolutely critical when you have a significant number of character variables that vary in length. 

 

Permutations of DBMS options (EXCEL/XLS/XLSX) and file formats (.xls, .xlsx, .xml) might be worth a shot (or you can come up with your own):

 

  • try DBMS=EXCEL with your existing ".xls" file
  • try DBMS=XLSX with your existing ".xls" file
  • within Excel, save the file as ".xlsx" and try DBMS=XLSX
  • within Excel, save the file as Excel ".xml" and try DBMS=XLSX
  • within Excel, save the file as Excel ".xml" and try DBMS=XLS

 

Some of the above pairs may not make sense, so my suggestions should be taken with a grain of salt. 

 

-- hbi

New Contributor
Posts: 3

Re: ERROR: Not enough memory available to allocate storage.

Hello Hbi,

 

Thank you for replying my post.

 

I am using SAS university Edition and my OS is windows 10x64bits.

 

And i did try DBMS=excel and it gave me "Error: DBMS type excel not valid for import".

 

-Lei

Super User
Posts: 3,100

Re: ERROR: Not enough memory available to allocate storage.

Try adding this statement to your code to find out how much memory SAS is using:

 

options fullstimer;
PROC Star
Posts: 1,555

Re: ERROR: Not enough memory available to allocate storage.

And post the result of

proc options group=memory;run;

and of

%put Free RAM = %sysfunc(putn(%sysfunc(getoption(xmrlmem))/1024**2,comma10.))MB;
Ask a Question
Discussion stats
  • 6 replies
  • 1282 views
  • 0 likes
  • 5 in conversation