Using SAS Files from Other Versions with SAS 9.4 for Windows

Introduction to Using SAS Files from Other Versions with SAS 9.4 for Windows

SAS files that were created in Versions 8, 7, and 6 can be processed, with some restrictions, without having to convert files to the SAS 9.4 format.
SAS 9.4 file formats are the same as Version 7 and 8 file formats with the exception of a few new features. Summary of Using Version 6, 7, and 8 Data Sets and Catalogs in SAS 9.4 summarizes the actions that you need to take in order to use SAS files from a previous release, if the files in the SAS library are for the same release of SAS.
If you want to use SAS 9.4 to access catalogs that were created with earlier releases of SAS for Windows, you might have to convert the catalogs from the earlier releases to the SAS 9.4 format before you can use the catalogs in a SAS 9.4 program.
The following table provides information about data set and catalog conversion.
Summary of Using Version 6, 7, and 8 Data Sets and Catalogs in SAS 9.4
Version or Release
Data Sets
Catalogs
Version 7 and 8
In 32-bit SAS, no action is necessary. SAS reads, updates, and writes to Version 7 and Version 8 data sets.
In 64-bit SAS there are no updates to read and write. No action is required.
In 32-bit SAS no action is necessary. SAS reads, updates, and writes to Version 7 and Version 8 catalogs.
In 64-bit SAS, migrate to SAS 9 by using the MIGRATE procedure with the SLIBREF option.
Releases 6.08 - 6.12
The V6 engine is automatically detected. In 32-bit SAS no action is necessary. SAS reads, updates, and writes to Version 6 data sets.
In 64-bit SAS, SAS can read a V6 data set but cannot write to a V6 data set.
In 32-bit SAS, SAS can read a Version 6 catalog but cannot write to it.
In 64-bit SAS convert to SAS 9 by using the CPORT and CIMPORT procedures.
Releases 6.03 and 6.04
Use the V604 engine to read data. You cannot write to Release 6.03 and 6.04 data sets.
not supported
As the table shows, in 32-bit SAS, except for Release 6.04 and Release 6.03 data sets, Version 6 (32-bit SAS) and Version 7 and 8 data sets do not need to be converted to SAS 9.4 data sets in order for SAS 9.4 to read, update, and write to the data sets. In 64-bit SAS, the cross- data access (CEDA) facility imposes some restrictions.
In 32-bit SAS, Version 7 and 8 catalogs also do not need to be converted to V9 catalogs. Version 6 SAS catalogs can be read but not updated. If a Version 6 catalog is to be updated, you must convert it to a SAS 9.4 catalog.
The Migration focus area at http://support.sas.com/migration discusses in detail how to use or convert SAS files that were created in Release 6.08 through Version 8. See the SAS/CONNECT User’s Guide for information about accessing Version 6 SAS files if you use Remote Library Services to access SAS files on a server.
To use SAS files that were created under an operating other than Windows, you need to transport those files to the Windows . A separate document, Moving and Accessing SAS Files, discusses transporting files from one operating to another operating .

Using Release 6.08 through Release 8.2 Data Sets

If your SAS library contains SAS files from only a single release of SAS, such as Release 6.12 or Version 8, SAS automatically determines the appropriate engine to use for these SAS data sets. If your SAS files are in a mixed mode library that possibly contains SAS data sets from multiple releases, you must specify the engine parameter in the LIBNAME statement. The default engine is V9.
For example, if you know that the 'c:\mydata' SAS library contains only Version 6 files, the following SAS statements print a Version 6 SAS data set that is named WINDATA.SALEFIGS created under Windows:
libname windata 'c:\mydata';
proc print data=windata.salefigs;
   title 'Sales Figures';
run;
Where all SAS files in the library are Version 6 SAS files, you can omit the engine parameter because SAS automatically detects the V6 engine.
Using the same example, suppose you are unsure of the file's version or suppose you know that the SAS library is a mixed mode library. In those cases, you must specify the engine name in the LIBNAME statement in order to access the V6 files:
libname windata v6 'c:\mydata';
proc print data=windata.salefigs;
   title 'Sales Figures';
run;
Release 6.03 and Release 6.04 SAS files require a specific engine. For more information, see Using Release 6.03 and Release 6.04 SAS Data Sets .

Using Release 6.03 and Release 6.04 SAS Data Sets

The V604 engine enables you to read from Release 6.03 and Release 6.04 SAS data sets directly from your 32-bit Windows SAS 9.4 session. Release 6.03 and Release 6.04 SAS data sets are not compatible with the x64 64-bit SAS. (Remember that there is no difference between Release 6.03 and Release 6.04 SAS data sets.) This feature is useful when you have SAS data sets that you want to share between Release 6.04 for PCs and SAS 9.4 under Windows. The V604 engine is supported only for SAS data sets (member type DATA). For example, if you have a Release 6.04 SAS data set that is named MYLIB.FRUIT that you want to print, you can submit the following statements from a SAS 9.4 session:
libname mylib v604 'c:\sas604';
proc print data=mylib.fruit;
run;

Converting Release 6.08 through Release 6.12 SAS Data Sets

You should convert your Version 6 SAS data sets to the SAS 9.4 format if you access them often and do not need to read the files from Version 6. The data set format of SAS 9.4 is more efficient than the Version 6 format, and there are new SAS 9.4 features that cannot be used unless the data sets are converted. You should migrate Release 6.12 libraries by using the MIGRATE procedure. For information about how to convert libraries before 6.12, see Moving and Accessing SAS Files.
Note: For more information about conversion, you can access information from the Migration focus area at: http://support.sas.com/migration.

Using Version 7 and 8 Catalogs in SAS 9.4

Because SAS 9.4 file formats are basically the same as Version 7 and 8 file formats, a 32-bit platform can read, update, and write to Version 7 and 8 catalogs without having to convert them to SAS 9.4 catalogs.
However, when SAS is running under 64-bit Windows, it cannot read 32-bit catalogs.

Converting Version 6 SAS Catalogs in SAS 9.4

Because of the differences in the internal structures of the operating s, you can use the CPORT and CIMPORT procedures to convert Version 6 SAS catalogs that were created under Windows to SAS 9.4 format before you can use the catalogs in your SAS 9.4 session under Windows. Follow these steps:
  1. Using the CPORT procedure in your Version 6 SAS session, create a transport file that contains the SAS catalog to be converted.
  2. Transfer the file (perhaps on a network or disk) to a location that your SAS 9.4 session can read.
  3. Use the CIMPORT procedure from your SAS 9.4 session to read the transport file and create a converted SAS catalog.
For information about using the CPORT and CIMPORT procedures, see Moving and Accessing SAS Files and the Base SAS Procedures Guide.
There are other conversion methods. For information see Moving and Accessing SAS Files.

Converting Release 6.08 SAS Catalogs to SAS 9.4

If you are converting directly from Release 6.08 to SAS 9.4, you can use the CPORT procedure in Release 6.08 to create a transport file, and then use the SAS 9.4 CIMPORT procedure to convert the catalog to a SAS 9.4 catalog. However, the HSERVICE and TOOLBOX catalog entries are not portable if you use CPORT from a Release 6.08 session.
An alternative way to convert Release 6.08 catalogs is to use the C16PORT procedure that is provided in Release 6.10 through Release 6.12. SAS provided the C16PORT procedure to convert the 16-bit catalogs that were created with Release 6.08 under Windows to a 32-bit format that SAS can use. You can use the C16PORT procedure from within one of these earlier releases of SAS to create a catalog that can later be read by SAS 9.4. (The C16PORT procedure is not available in SAS 9.4.)
To convert your SAS catalogs from Release 6.08 under Windows to SAS 9.4:
  1. While in your Release 6.10, Release 6.11, or Release 6.12 session, use the C16PORT procedure (described in the documentation for those releases) to create a transport file that contains the SAS catalog from Release 6.08.
  2. Transfer the file (perhaps on a network or by using binary FTP) to a location where SAS 9.4 can read it.
  3. Use the 9.4 CIMPORT procedure to read the transport file and create a converted SAS V9.4 catalog.
If you want to convert a catalog that currently exists on another machine running Release 6.08 for Windows, you must first transfer the file (perhaps on a network or by using binary FTP) to a place where your SAS 9.4 session can read it.
The following example uses the C16PORT procedure in Release 6.12 to create a transport file from the INLIB.CAT catalog, and then creates a Release 6.12 catalog (OUTLIB.CAT) using the CIMPORT procedure.
   /* Folder where catalog    */
   /* 'cat.sc2' resides       */
libname inlib 'c:\cat608'; 
   /* Folder where catalog    */
   /* 'cat.sc8' will reside   */
libname outlib 'c:\cat612'; 
proc c16port file='transprt' c=inlib.cat;
run;

/* Move the transport file to a location where SAS can read it */
/* Once the file is accessible, run the following procedure.  */

proc cimport infile='transprt' c=outlib.cat;
run;
The Release 6.12 SAS catalog can now be read by SAS 9.4. For information about the CPORT and CIMPORT procedures, see the Base SAS Procedures Guide and Moving and Accessing SAS Files.

Converting Release 6.03 and Release 6.04 SAS Catalogs to SAS 9.4

If you want to convert Release 6.04 SAS catalogs to their SAS 9.4 counterparts, see Moving and Accessing SAS Files.

Creating Release 6.08 through Release 6.12 Data Sets

You might need to create Release 6.08 through Release 6.12 data sets from your SAS session under Windows. This action is similar to reading Version 6 data sets in that you use the V6 engine. For example, the following SAS statements use the V6 engine to create a SAS data set named QTR1. The raw data are read from the external file that is associated with the fileref MYFILE.
libname windata v6 'c:\mydata';
filename myfile 'c:\qtr1data.dat';
data windata.qtr1;
   infile myfile;
   input saledate amount;
run;