Hello,
I currently have two questions that may be rather simple, but are confusing me nonetheless. First, I am using data ranging from 1980-2014, all of which are in the sas7bdat format. The years of 1980-2010 can be opened without an issue, but the remaining four receive an error in SAS and cannot seem to be opened. The log window in SAS shows an error stating the formats for the variables (2011-2014) cannot be found or loaded. It would assume that there wouldn't be much of an issue, since the all of the files are of the same type, but I'm fairly new to SAS, and haven't found a way to open these. If anyone could give me a few pointers, it would be greatly appreciated.
I would also like to know if there is a way to convert what I understand to be older SAS datasets (.sd2) to the newer sas7bdat (.sd7) file type. I have one dataset in former format, while the rest of the datasets I am using are in the latter. Again, any help would be wonderful.
Thank you for your time!
Thanks for your time
To tell SAS to ignore the fact that it cannot find the user defined formats that are linked to the variables in your datasets use the NOFMTERR option.
OPTIONS NOFMTERR:
To convert the older datasets try using the V6 libname engine. But note that unlike SAS7BDAT files the older V6 format was not portable across hardware/software platforms.
libname in v6 'path';
libname out v9 'path';
proc copy inlib=in outlib=out;
run;
To tell SAS to ignore the fact that it cannot find the user defined formats that are linked to the variables in your datasets use the NOFMTERR option.
OPTIONS NOFMTERR:
To convert the older datasets try using the V6 libname engine. But note that unlike SAS7BDAT files the older V6 format was not portable across hardware/software platforms.
libname in v6 'path';
libname out v9 'path';
proc copy inlib=in outlib=out;
run;
If you want to convert all old files in a library to the most recent format to be stored under a new library then you could also use Proc Migrate.
If you can stilll access the .sd2 files with your current SAS, a simple data step to a library that uses the v7 engine will do it.
Thanks to all three of you. My issues have been resolved. I appreciate your time.
I have .sd2 file.I am unable to open the file in SAS.Please help me to open the file
@king_aj wrote:
I have .sd2 file.I am unable to open the file in SAS.Please help me to open the file
This topic has been solved. Open a new topic on your own for your question, if @Tom's solution doesn't work at your site. Also open a track with SAS technical support, they might be able to help you.
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
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.