BookmarkSubscribeRSS Feed
jim_toby
Quartz | Level 8

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!

 
7 REPLIES 7
Reeza
Super User
This sounds like a SAS Tech Support question.
SASKiwi
PROC Star

Do you get errors reading the table in SAS code? Try running this:

 

data test;
  set MyLib.MyTable;
run;
jim_toby
Quartz | Level 8

@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

DaveHorne
SAS Employee

Hi @jim_toby, one other thing to try is proc datasets repair:

 

proc datasets library=MyLib;
  repair MyTable;
 quit;                                                                                                                                  
run;                                                                                                                                    

jim_toby
Quartz | Level 8

@DaveHorne thanks for the suggestion. I tried that and it ran fine. However, it didnt fix the issue I was having.

SASKiwi
PROC Star

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;

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

How to connect to databases in SAS Viya

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.

Discussion stats
  • 7 replies
  • 3473 views
  • 2 likes
  • 5 in conversation