SAS Data Integration Studio, DataFlux Data Management Studio, SAS/ACCESS, SAS Data Loader for Hadoop and others

Converting sd2 datasets to sas7bdat

Accepted Solution Solved
Reply
New Contributor
Posts: 3
Accepted Solution

Converting sd2 datasets to sas7bdat

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


Accepted Solutions
Solution
‎03-29-2017 02:49 PM
Super User
Super User
Posts: 7,065

Re: Converting sd2 datasets to sas7bdat

[ Edited ]

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;

 

 

View solution in original post


All Replies
Solution
‎03-29-2017 02:49 PM
Super User
Super User
Posts: 7,065

Re: Converting sd2 datasets to sas7bdat

[ Edited ]

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;

 

 

Respected Advisor
Posts: 4,173

Re: Converting sd2 datasets to sas7bdat

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.

http://support.sas.com/documentation/cdl/en/proc/70377/HTML/default/viewer.htm#p1kv04orx2cy03n1urnto...

 

Super User
Posts: 7,832

Re: Converting sd2 datasets to sas7bdat

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.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
New Contributor
Posts: 3

Re: Converting sd2 datasets to sas7bdat

Thanks to all three of you. My issues have been resolved. I appreciate your time. 

 

Contributor
Posts: 28

Re: Converting sd2 datasets to sas7bdat

I have .sd2 file.I am unable to open the file in SAS.Please help me to open the file

Super User
Posts: 7,832

Re: Converting sd2 datasets to sas7bdat


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.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 6 replies
  • 1021 views
  • 1 like
  • 5 in conversation