Hi All,
When I am trying to read a sas dataset, I am getting an weird error "Error: An I/O error has occurred on file". This is a recent problem I'm facing and doesn't occur always.
When I started investigating I found the following link http://support.sas.com/kb/12/135.html
According to the link this error appears while the drive which contain sas temporary/work datasets have low disk space. But my E: drive (which contain SAS temporary files) have more than 1 TB space !
So, now I am confused. Could anybody please help me through.
Thanks in advance for your efforts.
Thanks & Regards,
Saugata Mukherjee.
It would be helpful if you could post the code that is generating the problem along with the error itself. This error can be caused by a variety of issues of which the low disk space is just one.
For example disk hardware problems can cause this. Also be aware that some SAS processes, for example PROC SORT, use at least double the space of the SAS dataset being sorted to complete a sort.
Hi,
Thanks for taking interest in solving the problem. Please find below the details you have asked for:
The code and error:
131 data temp;
132 set database.pvweek_1_12;
133 where view_date='01sep2011'd;
134 run;
ERROR: An I/O error has occurred on file DATABASE.PVWEEK_1_12.DATA.
NOTE: The data step has been abnormally terminated.
NOTE: The SAS System stopped processing this step because of errors.
WARNING: The data set WORK.TEMP may be incomplete. When this step was stopped there were 0
observations and 8 variables.
WARNING: Data set WORK.TEMP was not replaced because this step was stopped.
NOTE: DATA statement used (Total process time):
real time 0.43 seconds
cpu time 0.40 seconds
As you can see it is just a reading a file. And the weirdest thing is not always we are getting this problem just now i have executed the same code and got desired result!!!!
159 data temp;
160 set database.pvweek_1_12;
161 where view_date='01dec2011'd;
162 run;
NOTE: There were 308593 observations read from the data set DATABASE.PVWEEK_1_12.
WHERE view_date='01DEC2011'D;
NOTE: The data set WORK.TEMP has 308593 observations and 8 variables.
NOTE: DATA statement used (Total process time):
real time 3.62 seconds
cpu time 0.79 seconds
I am really baffled now.
Other information you have asked for:
The size of the dataset: 650 Mb
We are not using Index in this file.
Os: Microsoft windows server 2003, Enterprise edition, Service pack 2
Free Disk space on the driver 1.2 TB.
I have run into similar problems trying to analyze data of that size, on a Windows 2003 server, when the file was on a different machine than the one on which SAS was located. I found that the only way we could totally avoid such errors was to first copy the file onto the same server that was running SAS.
Also include what OS you are on, size of the dataset, does it have an index etc
Hi,
Thanks for taking interest in solving the problem. Please find below the details you have asked for:
The code and error:
131 data temp;
132 set database.pvweek_1_12;
133 where view_date='01sep2011'd;
134 run;
ERROR: An I/O error has occurred on file DATABASE.PVWEEK_1_12.DATA.
NOTE: The data step has been abnormally terminated.
NOTE: The SAS System stopped processing this step because of errors.
WARNING: The data set WORK.TEMP may be incomplete. When this step was stopped there were 0
observations and 8 variables.
WARNING: Data set WORK.TEMP was not replaced because this step was stopped.
NOTE: DATA statement used (Total process time):
real time 0.43 seconds
cpu time 0.40 seconds
As you can see it is just a reading a file. And the weirdest thing is not always we are getting this problem. Just now i have executed the same code and got desired result!!!!
159 data temp;
160 set database.pvweek_1_12;
161 where view_date='01dec2011'd;
162 run;
NOTE: There were 308593 observations read from the data set DATABASE.PVWEEK_1_12.
WHERE view_date='01DEC2011'D;
NOTE: The data set WORK.TEMP has 308593 observations and 8 variables.
NOTE: DATA statement used (Total process time):
real time 3.62 seconds
cpu time 0.79 seconds
I am really baffled now.
Other information you have asked for:
The size of the dataset: 650 Mb
We are not using Index in this file.
Os: Microsoft windows server 2003, Enterprise edition, Service pack 2
Free Disk space on the driver 1.2 TB.
Just a thought - have you checked into the possibility that the error message needs to be taken literally? i.e. Is there a problem with the disk itself? I would have thought drive problems would result in error messages from Windows itself, but one never knows.
Where is the DATABASE SAS library located? Is it on a locally attached drive on the server? Also I suggest you check out the Windows Event Log which you can access from the Windows Control Panel. Are there any errors being recorded about the time you got your I/O error? If there are then it is possible your server has an intermittent hardware fault. You will need to involve your IT server support people to investigate server faults further.
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!
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.