Help using Base SAS procedures

Unable to allocate sufficient memory

Reply
Contributor
Posts: 28

Unable to allocate sufficient memory

Hello-

I am trying to run a frequency and output a dataset with five different variables.  Here is my code:

PROC FREQ DATA=EXP noprint;

     TABLES CENSUS*CUMM*PIT*WEEK*DAY/LIST OUT=TEMP1;RUN;   

I am getting this message:  Can anyone help me please?

 

ERROR: Unable to allocate sufficient memory. At least 1521783K bytes were requested, but only 786430K were available. You must either increase the amount of memory available, or approach the problem differently.

ERROR: The SAS System stopped processing this step because of insufficient memory.

Super User
Posts: 3,115

Re: Unable to allocate sufficient memory

How many unique values are there in each of your table variables? SAS needs enough memory to track each value in each variable. Try simplifying your TABLE statement by removing one variable at a time until the program runs successfully.

Trusted Advisor
Posts: 2,113

Re: Unable to allocate sufficient memory

You could also sort the data by the variable with the most levels and change that into a BY variable, that is likely to get your FREQ into the space you have.

Frequent Contributor
Posts: 81

Re: Unable to allocate sufficient memory

Hi,


Just Use the MEMSIZE option as it specifies the limit on the total amount of memory to be used by SAS.

To determine the optimal setting of MEMSIZE, run the SAS procedure or DATA step with MEMSIZE=0 with the FULLSTIMER option. Note the amount of memory that is used by the process, and then set MEMSIZE to a larger amount.

Setting MEMSIZE to 0 is the same as setting MEMSIZE to MAX.

/Daman

Ask a Question
Discussion stats
  • 3 replies
  • 2698 views
  • 0 likes
  • 4 in conversation