Hi I have a huge data set 915K records for which I want to do a PROC FREQ on just one field which is 90 bytes long. I seem to be running out space for some reason. Can any offer any help/suggestions on how I might get around this.
NOTE: The SAS System stopped processing this step because of insufficient memory.
I am trying to output this to another dataset with a OUT statement still no joy.
The reason that you were running out of space is that the memory needs of FREQ are a function of the number of DISTINCT values of the variable times it's length (the reference manual should have the exact formula). With that many observations and a text field, you'll could have lots.
The SORTing and SUMMARY are disk space dependent. SQL is a mix, as it tries to put as much in memory as it can and then relies on disk. Both will take longer than FREQ would have done if you had enough memory.
This is basically the same idea as suggest already.
I don't know how long it would take to sort the data. You might want to do sort the data in groups then combine and count. Be sure to keep only the variable that needs counting. Should save a lot ot time if the data set has lots of variables.
proc sort data=sashelp.shoes(keep=Subsidiary firstobs=1 obs=200) out=bin1;
proc sort data=sashelp.shoes(keep=Subsidiary firstobs=201 obs=max) out=bin2;
do Frequency=1 by 1 until(last.Subsidiary);
set bin1 bin2;
CumulativeFrequency + Frequency;