Help using Base SAS procedures

ERROR: Memory Shortage while running proc surveymeans

Accepted Solution Solved
Reply
New Contributor
Posts: 2
Accepted Solution

ERROR: Memory Shortage while running proc surveymeans

Hello!

 

I'm trying to run proc surveymeans on a very large data set (14 million observations), and keep getting the following error messages:

 

NOTE: Only one cluster in a stratum for variable(s) ReadmitCHG. The estimate of variance for ReadmitCHG will omit this stratum.
ERROR: PROC SURVEYMEANS was terminated prematurely due to a memory shortage while computing quantiles. Increasing MEMSIZE and/or REALMEMSIZE may
allow normal processing to complete.
NOTE: Processing on disk occurred during summarization. Peak disk usage was approximately 62 Mbytes. Adjusting MEMSIZE and/or REALMEMSIZE may
improve performance.
ERROR: The SAS System stopped processing this step because of insufficient memory.
NOTE: PROCEDURE SURVEYMEANS used (Total process time):
real time 1:47.23
cpu time 1:46.69

 

Here is the code I have been using:

 

proc surveymeans data=index_events missing sumwgt sum mean;
strata NRD_STRATUM;
cluster HOSP_NRD;
weight DISCWT;
domain IndexEvent IndexEvent*AgeGroup;
var Readmit TOTCHG ReadmitCHG totalreadmissions;
ods output domain=domain;
run;

 

Does anybody have any advice on fixing the memory issue? I can't seem to figure it out. Thanks in advance!


Accepted Solutions
Solution
‎07-31-2017 10:20 AM
Super User
Posts: 19,768

Re: ERROR: Memory Shortage while running proc surveymeans

You have to set it in the Config file or on startup.

I think there are instructions here that make sense:

https://stackoverflow.com/questions/37038194/increasing-sas-memory-memsize

 

View solution in original post


All Replies
Super User
Posts: 19,768

Re: ERROR: Memory Shortage while running proc surveymeans

Have you tried increasing MEMSIZE and REALMEMSIZE as the error indicates?

New Contributor
Posts: 2

Re: ERROR: Memory Shortage while running proc surveymeans

I have attempted to but I'm not sure if I am doing it properly. Any advice on how to increase memsize and realmemsize would be great.

Solution
‎07-31-2017 10:20 AM
Super User
Posts: 19,768

Re: ERROR: Memory Shortage while running proc surveymeans

You have to set it in the Config file or on startup.

I think there are instructions here that make sense:

https://stackoverflow.com/questions/37038194/increasing-sas-memory-memsize

 

Super Contributor
Posts: 438

Re: ERROR: Memory Shortage while running proc surveymeans

I's not mentioned in the link but you can set memsize and realmemsize to the parameter MAX which will means SAS will use all the memory it can get - whether that's a good idea depends on your environment and how you're using SAS....

☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 4 replies
  • 269 views
  • 0 likes
  • 3 in conversation