I am running a simple regression with the following code, with a data file, 21M in size, 4 columns (ID, date, amount, count), 300204 obs. I tested the code on a smaller size sample (2457 obs) and it ran smoothly. But with this larger sample (300204 obs), I got an error message after running about 23 hours. The message says:
sas.exe has stopped working.
A problem caused the program to stop working correctly. Windows will close the program and notify you if a solution is available.
Then a button "close program".
proc printto log="D:\Analysis\30days.log"; /* to print log to a file */
run;
ods table parameterEstimates=ana30.logfile; /* to save coefficients */
PROC REG DATA=ana30.mydata;
BY ID ;
MODEL amount= count ;
RUN;
Then in the windows event log, I saw 4 errors:
Critical SAS error: Write Access Violation REG Exception occurred at (65a9f27)
Critical SAS error: Write Access Violation REG Exception occurred at (1e49c0b)
Critical SAS error: Write Access Violation REG Exception occurred at (1e49afa)
Critical SAS error: Stack overflow detected REG Exception occurred at (4e849fc)
I have no idea which board to ask this question, and just try here and hope someone can give me some hints
Thank you very much!
Rick's answer is correct - most likely the QUIT is the issue.
proc printto log="D:\Analysis\30days.log"; /* to print log to a file */
run;
ods graphics off;
ods select parameterEstimates;
ods table parameterEstimates=ana30.logfile; /* to save coefficients */
PROC REG DATA=ana30.mydata;
BY ID ;
MODEL amount= count ;
RUN;
QUIT;
What does your SAS log say?
Your data doesn't appear complex enough to cause any space issues...
24 hours also seems like way too long for a 300K file
Similar thing happened to me and often goes away after restarting SAS. If it doesn't, you should open a ticket with SAS Tech Support.
I see a several problems with your code:
@Rick_SAS ODS Table is correct - and it can be used before proc. If you're also suppressing output then you have to use ODS output, so it's preferable to use ODS OUTPUT in general.
As far as I can tell, ODS TABLE is not a documented statement.
Rick's answer is correct - most likely the QUIT is the issue.
proc printto log="D:\Analysis\30days.log"; /* to print log to a file */
run;
ods graphics off;
ods select parameterEstimates;
ods table parameterEstimates=ana30.logfile; /* to save coefficients */
PROC REG DATA=ana30.mydata;
BY ID ;
MODEL amount= count ;
RUN;
QUIT;
Thank you for your replies and suggestions. I was doing something else so I did not follow up in time.
I googled and found the solution (hopefully) http://support.sas.com/kb/54/246.html
They have a hot fix and I just installed and followed their instructions.
I also use data from the work temporary library, not from the permanent library. Maybe this can be faster too.
I just output to the log, saving time to write log to the file (last time I got a message telling me log is full so I used this option). I forgot to clear the log last time before submitting the program.
Will see tomorrow if I have program again.
Thank you, Reeza. With your code, there was no error any more, and it ran much much faster.
Sorry that I did not come back to update in time. Was testing running SAS on a high performance computation facility (Linux).
One thing worthy to mention is, I tested my original program, which gave error on my windows7 PC, but it did not have any issue running on the HPC facility. And it finished much faster. I guess the HPC system has a much higher I/O (and of course faster CPU too).
Renamed to better specify the contents of the thread.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.
Find more tutorials on the SAS Users YouTube channel.