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

saving data set to earlier version of SAS

Reply
Contributor
Posts: 50

saving data set to earlier version of SAS

I have sas 9.4. Another person in our office has 9.2 and she can't read the data sets I save. How do I save data sets to she can read them. I also have a 64 bit machine, I think she has 32 bit. Pretty sure we are all running on windows 7.

thanks

gene

Super User
Super User
Posts: 7,430

Re: saving data set to earlier version of SAS

I don't see SAS datasets being an issue between versions.  Are you sure there is nothing else wrong.  Only compiled SAS catlogs cause an issue between 32bit and 64bit.

For porting between platforms there is cport, or export to csv/xml.

Contributor
Posts: 50

Re: saving data set to earlier version of SAS

Really? So someone using 9.2 on a 32 bit machine should be able to read a data set I saved using 9.4 on a 64 bit machine? (except for the compiled sas catalog issue)  Anything else I should look for?

Super User
Super User
Posts: 7,430

Re: saving data set to earlier version of SAS

Yep, as far as I am aware, datasets are backward compatible whereas catalogs are not.  What is the error do you get when you libname to a location where the datasets are placed and then they double click on the datasets in the Explorer with SAS? 

Contributor
Posts: 50

Re: saving data set to earlier version of SAS

Good questions. I saved the file to a network drive. I'll find out about any error messages, how she accesses it, etc.

Super User
Posts: 10,548

Re: saving data set to earlier version of SAS

It might help to provide some information such as how your colleague is trying to read the data set and how you transferred it to her. Do you put the file on a shared network drive, send it via email or something else. Any error messages involved? Code used to read/use the set?


SAS Employee
Posts: 75

Re: saving data set to earlier version of SAS

The following topic is a general reference about this issue: Using a SAS 9 File in a Previous Release

Contributor
Posts: 50

Re: saving data set to earlier version of SAS

Thanks. That looks great!

PROC Star
Posts: 1,100

Re: saving data set to earlier version of SAS

I can't find the definitive statement in the documentation after a short search, but I'm quite positive that the file formats are the same in these two versions. The only thing I can think of is you may be using different internationalization and localisation options (different character sets). Please post error messages.

Tom

Contributor
Posts: 50

Re: saving data set to earlier version of SAS

Fortunately, the person who had trouble reading my data set is getting 9.3 installed, so that will take care of it for the moment. However, we may still need to do this in the future, so I'll look at Dave R's link, and keep all the other answers in mind too.

Thanks to everyone!

Gene

PROC Star
Posts: 1,100

Re: saving data set to earlier version of SAS

Well, I wouldn't be too optimistic. Since I believe that the 9.2 through 9.4 file formats are identical, in theory the problem should still arise.

Keep us posted!

Respected Advisor
Posts: 3,902

Re: saving data set to earlier version of SAS

I believe the answer provides is what you're looking for. You need to create the SAS file using option "ExtendObsCounter=no"

http://support.sas.com/documentation/cdl/en/lrcon/67401/HTML/default/viewer.htm#p1ldhc0p7imdegn1hie6...

Syntax

EXTENDOBSCOUNTER=YES | NO

Syntax Description

YES

requests an enhanced file format in a newly created SAS data file that counts

observations beyond the 32-bit limitation. Although this SAS data file is created for

an operating environment that stores the number of observations with a 32-bit

integer, the data file behaves like a 64-bit file with respect to counters. This is the

default.

Restrictions A SAS data file that is created with an extended observation count is

incompatible with releases prior to SAS 9.3. If the SAS data file was

created in SAS 9.3 or later and EXTENDOBSCOUNTER was set to

YES when the SAS data file was created, you must re-create the SAS

data file with EXTENDOBSCOUNTER=NO.

EXTENDOBSCOUNTER=YES is valid only for an output SAS data

file whose internal data representation stores the observation count as

a 32-bit integer. EXTENDOBSCOUNTER=YES is ignored for SAS

data files with a 64-bit integer. For a table that lists the operating

environments and the OUTREP= data representation values that are

appropriate with EXTENDOBSCOUNTER=YES, see “When

Extending the Observation Count Is Supported” in Chapter 26 of SAS

Language Reference: Concepts.

NO

specifies that the maximum observation count in a newly created SAS data file is

determined by the long integer size for the operating environment. In operating

environments with a 32-bit integer, the maximum number is 231–1 or approximately

two billion observations (2,147,483,647). In operating environments with a 64-bit

integer, the maximum number is 263–1 or approximately 9.2 quintillion observations.

Super User
Posts: 9,691

Re: saving data set to earlier version of SAS

This maybe give you low version sas dataset . also try to V7 V8 engine .

libname x v6 'c:\temp';
data x.class;
 set sashelp.class;
run;

Xia Keshan

N/A
Posts: 1

Re: saving data set to earlier version of SAS

Hi Geneshackman,


You just have to do one simple thing before creating any dataset in SAS higher versions (9.2,9.3,9.4)

You need to use

options ExtendObsCounter=no;

or    

option EOC=NO

This Options will help   you to create compatible datasets from higher versions to lower versions.

I too was facing the same problem and it worked out for me.

I am sure it will work out for you also.

Other than this for permanent solution you can update your sas config file

option EOC=NO in a SAS configuration file.

Regards,

Nilesh Khamgal

Ask a Question
Discussion stats
  • 13 replies
  • 4060 views
  • 6 likes
  • 8 in conversation