If I run a code like one below, SAS (9.04.01M5P091317) seems to be taking up more and more memory with every loop without ever clearing it and eventually runs out of it. It only happens with the median function. The total memory usage is almost constant when I use 'mean' or 'distinct' instead. What's going on?
%macro loop(n);
%do i = 1 %to &n.;
proc sql;
create table out as select
median(AgeCHDdiag)
from sashelp.heart;
quit;
%end;
%mend;
%loop(1000);
This looks like a bug to me.
You can check the available memory with option XMRLMEM.
Report the issue to SAS Tech support.
This looks like a bug to me.
You can check the available memory with option XMRLMEM.
Report the issue to SAS Tech support.
Report it to SAS. http://support.sas.com
Use PROC MEANS (aka PROC SUMMARY) or PROC UNIVARIATE instead of calculate medians.
I'm on the same SAS version 9.04.01M5P091317 under RHEL and can confirm your observation.
Please raise this with SAS Tech Support.
Problem confirmed using the same version on windows server 2012r2.
Memory stays used after proc sql ends.
Available on demand!
Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Select SAS Training centers are offering in-person courses. View upcoming courses for: