|SAS Companion for the Microsoft Windows Environment|
This section discusses using SAS files from previous releases of SAS for Windows. For information on transporting files from other operating environments to the Windows environment, see Moving and Accessing SAS Files across Operating Environments.
If you intend to use pre-Version 8 SAS files with only the SAS System for Version 8, you will see improved performance if you convert your pre-Version 8 files to the Version 8 files.
Note: If you will be using your SAS files with previous releases of the SAS System,
do not convert your files to Version 8 files.
Migrating Existing SAS Files to Version 8 summarizes the steps you must complete to use your existing SAS data sets and catalogs for Windows with Version 8.
|Release||SAS Data Sets||SAS Catalogs|
|6.12 for Windows||transparent||CPORT and
|6.11 for Windows||transparent||CPORT and
|6.10 for Windows||transparent||CPORT and
|6.09 for Windows NT||transparent||CPORT and
|6.08 for Windows||transparent||CPORT (C16PORT) and CIMPORT|
|6.04 and 6.03 for DOS||V604||CPORT and
As the table shows, except for Release 6.04 and Release 6.03 data sets, Release 6 data sets do not need to be converted to Version 8 data sets for Version 8 to read the data sets. All Release 5 and Release 6 SAS catalogs must be transported to be used in Version 8.
Note: Version 8 of SAS under Windows does not read OS/2
SAS data sets directly as it did in Release 6. To use OS/2 SAS data sets in
the Windows operating environment, you must either transport them or use Cross
Environment Data Access (CEDA). For more information, see Moving and Accessing SAS Files across Operating Environments.
|Using Release 6 SAS Data Sets in Version 8|
section discusses using SAS data sets created using Release
6.03 through Release 6.12.
If your SAS library contains only Release 6 SAS files, the SAS System for Version 8 automatically determines the appropriate engine to use for Version 6.08 and later SAS data sets. If your SAS files are in a mixed mode library that possibly contains SAS data sets from Release 6 and Version 8, you must specify the engine parameter on the LIBNAME statement or the engine will default to V8. For information on using Release 6.03 and Release 6.04 SAS files, see Using Release 6.03 and Release 6.04 SAS Data Sets.
For example, knowing that the 'c:\mydata' SAS library contains only Release 6 files, the following SAS statements print a Release 6 SAS data set named WINDATA.SALEFIGS created under Version 3.1.1 of Windows:
libname windata 'c:\mydata'; proc print data=windata.salefigs; title 'Sales Figures'; run;Where all SAS files in the library are Release 6 SAS files, you can omit the engine parameter because SAS automatically detects the V6 engine.
Using the same example, if you are unsure or if you know that the SAS library is a mixed mode library, you must specify the engine name in the LIBNAME statement to access the V6 files:
libname windata v6 'c:\mydata'; proc print data=windata.salefigs; title 'Sales Figures'; run;
You may want to convert your Release 6 SAS files to
Version 8 format. There are separate considerations for converting SAS data
sets and SAS catalogs.
The V604 engine enables you to read from and write to Release 6.03 and Release 6.04 SAS data sets directly from your Version 8 SAS session. (Remember that there is no difference between Release 6.04 and Release 6.03 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 Version 8 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 named MYLIB.FRUIT that you want to print, you can submit the following statements from a Version 8 session:
libname mylib v604 'c:\sas604'; proc print data=mylib.fruit; run;While it is useful to be able to access SAS data sets created in a previous release of the SAS System, you cannot take advantage of the full functionality of the Version 8 SAS System, which includes creating indexes and database views, unless you convert the data sets reated with earlier releases of the SAS System to Version 8 data sets.
While access to Release 6 SAS data sets is quite easy when you use the V6 engine, you may want to consider converting your SAS data sets to Version 8 format if you access them often and do not need to read the files from Release 6 any more. The data set format of Version 8 of the SAS System is more efficient than the Release 6 format and there are new Version 8 features that cannot be used unless the data sets are converted.
The following SAS statements use the COPY procedure to convert all the Release 6 SAS data sets in the V6DATA SAS data library to Version 8 and to format and store the new data sets in the WINDATA library:
libname v6data v6 'c:\mydata'; libname windata V8 'd:\newdata'; proc copy in=v6data out=windata memtype=data; run;
Alternatively, you can use the DATA step to do the conversion, as in the following example. This technique works well if you want to convert only one or two data sets in a particular SAS data library.
libname v604data v604 'c:\mydata'; libname windata V8 'd:\newdata'; data windata.eggplant; set v604data.eggplant; run;
You can also use the CPORT and CIMPORT procedures to perform the conversion. Remember that when you convert a data set to Version 8 format, you can no longer read that data set from Release 6. For information on using the CPORT and CIMPORT procedures, see Moving and Accessing SAS Files across Operating Environmentsand SAS Procedures Guide.
Note: Do not
convert your Release 6. files to Version 8 if
you need to access the files from both releases.
You may need to create Release 6 SAS data sets from your Windows SAS session. This is similar to reading Release 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 associated with the fileref MYFILE.
libname windata v6 'c:\mydata'; filename myfile 'c:\qtr1data.dat'; data windata.qtr1; infile myfile; input saledate amount; run;
|Converting Release 6 SAS Catalogs in Version 8|
Because of the differences in the internal structures of the operating systems, you must use the CPORT and CIMPORT procedures to convert Release 6 SAS catalogs created under Windows to Version 8 format before you can use the catalogs in your Version 8 SAS session under Windows. Here are the basic steps to follow:
If you are converting directly from Release 6.08 to Version 8, you can use the CPORT procedure in Release 6.08 to create a transport file, and then use the Version 8 CIMPORT procedure to convert the catalog to a Version 8 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 provided in Release 6.10 through Release 6.12. SAS provided the C16PORT procedure to convert the 16-bit catalogs created with Release 6.08 under Windows to a 32-bit format that the SAS System can use. You can use the C16PORT procedure from within one of these earlier releases of the SAS System to create a catalog that can later be read by Version 8. (The C16PORT procedure is not available in Version 8.)
Here are the steps to follow to convert your SAS catalogs from Release 6.08 under Windows to Version 8:
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 a diskette) to a place where your Version 8 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, 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; proc cimport infile='transprt' c=outlib.cat; run;
The Release 6.12 SAS catalog can now be read by Version
8. For information on the CPORT and CIMPORT procedures, see SAS Procedures Guide and Moving and Accessing SAS Files across Operating Environments.
If you want to convert Release 6.04 SAS catalogs to their Version 8 counterparts, see SAS Technical Report P-195, Transporting SAS Files between Host Systems.
Top of Page
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.