I have a table that I open in SAS and I noticed that when I scroll to about halfway through the table, the rest of the rows will have an error message on all of the columns stating:
Error:<?xml version="1.0" ?><Exceptions><Exception><SAS Message severity="Error> File myTable.DATA is damaged. </SASMessage></Exception></Exceptions>
This appears in every column and every row starting at about halfway through the table.
When I go to hover over any of the damanged rows, I get a popup that states: SAS Enterprise Guide has encountered a problem. We reccommend hat you save your work and restart SAS Enterprise Guide.
When I restart it, the same thing will happen. The data never gets fixed. It has around 7 million rows but I can open much bigger tables without a problem. Any help towards fixing this issue is greatly appreciated!
Thanks @Reeza!
@jim_toby, here's a handy link to open a Technical Support track: https://support.sas.com/en/technical-support/contact-sas.html
Do you get errors reading the table in SAS code? Try running this:
data test;
set MyLib.MyTable;
run;
@SASKiwi I get the following errors when I run the code you provided:
ERROR: Expecting page 140289, got page -1 instead
ERROR: Page validation error while reading libname.Table.DATA
ERROR: File libname.Table.DATA is damanged. I/O processing did not complete
Hi @jim_toby, one other thing to try is proc datasets repair:
proc datasets library=MyLib;
repair MyTable;
quit;
run;
@DaveHorne thanks for the suggestion. I tried that and it ran fine. However, it didnt fix the issue I was having.
When did this table become damaged? Firstly, I would request a restore from backup (assuming here you have backups) of this table prior to when it got damaged. Secondly, construct a new undamaged table by running code like this to work around where the damaged row(s) are (set the nnnnnn to a row number just before the first damaged row):
data newtable;
set Mylib.DamagedTable (firstobs = 1 obs = nnnnnn);
run;
Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.
Register today!Need to connect to databases in SAS Viya? SAS’ David Ghan shows you two methods – via SAS/ACCESS LIBNAME and SAS Data Connector SASLIBS – in this video.
Find more tutorials on the SAS Users YouTube channel.