BookmarkSubscribeRSS Feed
Billybob73
Quartz | Level 8

Hi

I have a program that reads all metadata of all SAS datasets that reside in the network and the SAS server.

The program automatically assigns libraries for all paths in which datasets have been stored.

At the same time it reads the dataset properties in a step where dictionary.columns is used.

 

This happens successfully, however I bumped into a corrupt dataset that cannot be opened and then below happens.

Program stops with this error just for 1 dataset.

How can I circumvent that ?

Thanks!

 

 

ERROR:  An exception has been encountered.

Please contact technical support and provide them with the following traceback information:

 

The SAS task name is [SQL (2)]

ERROR:  Write Access Violation SQL (2)

Exception occurred at (00D2968F)

Task Traceback

Address   Frame     (DBGHELP API Version 4.0 rev 5)

0000000000D2968F  000000000E20C960  tkmk:tkBoot+0x1794F

0000000000D278C0  000000000E20C9C0  tkmk:tkBoot+0x15B80

00000000022F5947  000000000E20C9C8  sashost:Main+0x1E4B7

000000000995BDF4  000000000E20CA58  sasyoio:tkvercn1+0x1ADB4

4 REPLIES 4
Kurt_Bremser
Super User

First of all, I'd follow the advice and open a track with SAS TS, as SAS should give a message for a damaged dataset and not crash.

Then I'd rename the dataset, so that your program won't pick it up, but it will still be available for the support people.

ballardw
Super User

Have you been able to identify which dataset is the problem? Or at least which library it is in?

 

And the ever popular: is this repeatable with the same data set causing the same error?

Billybob73
Quartz | Level 8

Hi,

 

I have. For the moment I've skipped it. Luckily enough there was only 1 file  🙂

However, I think I need to build in something to prevent this specific file and similar files from being scanned for metadata.

 

I should try to open it. If it can't be opened, it should be skipped. First thing that comes to mind is :

 

%SYSFUNC(FOPEN(file ref));

 

Don't know if this works for datasets... but i 'll check.

Kurt_Bremser
Super User

Did you have a look at the file before you deleted/renamed it?

You could modify the initial find command I gave you to exclude files below a certain size, for instance.

 

OTOH, if this happens quote rarely, just see the resulting ERROR as a means to find "dead" dataset files you can weed out.

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

How to Concatenate Values

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 4 replies
  • 716 views
  • 0 likes
  • 3 in conversation