Hello,
I am encountering an error I have not seen before. I am getting this error after double clicking on the file in my file explorer. I was sent six SAS datasets that are all similar and two of them are producing this error, the others open normally. I have plenty of disk space, have restarted everything and redownloaded the datasets. Any thoughts on what to do? Thank you!
Datasets may be corrupted as pointed by @Tom Try repairing the datasets as follows
proc datasets lib=Your_library;
repair the_corrupt_file;
run;
quit;
Your_library is the libname of the location where corrupt file exists.
the_corrupt_file is the name of the corrupt dataset.
Did you assign a library to folder with those data sets before attempting to open them? If not that may help or may allow more options to examine them.
Thanks for the reply, I hadn't tried that. Still getting the error though. These are the errors I got when I tried to run a proc contents on the file and just double clicking in the file explorer after assigning the library.
Long shot here: what version of SAS are you running? And is it 32-bit?
If you are running SAS 9.3 or earlier it may be having difficulties with reading one of the header record values to accommodate larger data sets.
Run this code:
proc options option=extendobscounter;run;
If you get a message that the option doesn't exist (SAS 9.3 and earlier I think) that could be the problem: version of SAS.
If the log shows it is set to NO instead of Yes like this
EXTENDOBSCOUNTER=YES Specifies whether to extend the maximum number of observations in a new SAS data file.
you might be able to address this problem by setting the sytem option to EXTENDOBSCOUNTER=YES using the Options statement. As I say, this is sort of a long-shot.
Usually that means the file is corrupted. Perhaps you copied it from somewhere and only part of the file actually made it.
Datasets may be corrupted as pointed by @Tom Try repairing the datasets as follows
proc datasets lib=Your_library;
repair the_corrupt_file;
run;
quit;
Your_library is the libname of the location where corrupt file exists.
the_corrupt_file is the name of the corrupt dataset.
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.