Statistical Software Information - UMass AMherst

Site Licenses
Computer Labs
UNIX Server
Direct Purchase

Statistical Software
Instructional Materials

What's New
Current Releases

Software Developers' Links
"Third Party" Learning and Data Resources




Online Docs

Migrating from 32-bit SAS to 64-bit SAS

SAS datasets

SAS datasets (.sas7bdat files) created with 32-bit SAS can be read directly using 64-bit SAS. However, doing this will create some inefficiency, as SAS will be doing the conversion "on-the-fly". For improved efficiency, convert the dataset to 64-bit, using PROC CPORT/CIMPORT, discussed under SAS Formats catalogs.

SAS Formats Catalogs

SAS Formats catalogs (.sas7bcat files) are NOT compatible between 32-bit and 64-bit SAS. If you have formats catalogs created with 32-bit SAS, you will need to re-create them using 64-bit SAS.

  1. If you have the original SAS code, simply run that code using 64-bit SAS.
  2. Lacking original SAS code, export the formats catalog using 32-bit SAS, then import using 64-bit SAS. This requires you to have access to 32-bit SAS during the migration process. Be sure to complete this before your 32-bit SAS license expires! Here is some sample code:

Step 1: Using 32-bit SAS, export the contents (both datasets and formats catalogs) of C:\mysasdir to file transport.exp.

LIBNAME saslib 'C:\mysasdir\';
PROC CPORT LIBRARY=saslib FILE='C:\mysasdir\transport.exp';

Step 2: Using 64-bit SAS, import transport.exp to C:\mysasdir64. This creates 64-bit version of all datasets and formats catalogs originally in C:\mysasdir. We are storing them in a new folder to avoid confusion.

LIBNAME saslib64 'C:\mysasdir64\';
PROC CIMPORT LIBRARY=saslib64 INFILE='C:\mysasdir\transport.exp';

See Transporting SAS Libraries for more information about this process..

If you regularly need to share SAS formats catalogs with others who use 32-bit SAS, be sure to send them the formats catalog in export form, or as a SAS dataset.

SAS Code

To import Excel or Access files from 32-bit Office to 64-bit SAS, you will need to install 32-bit SAS PC Files Server (included with your SAS installation). SAS PC Files Server is a Windows service that starts automatically, and is used to translate the 32-bit Office data to 64-bit SAS.

All existing SAS code to import Excel or Access files will need to be modified:

Using PROC IMPORT, substitute DBMS=EXCELCS for DBMS=EXCEL, DBMS=ACCESSCS for DBMS=ACCESS, and remove GETNAMES and MIXED subcommands.

Example 1: Import Excel file from 32-bit Office to 64-bit SAS.  Note use of EXCELCS. 
            DATAFILE= "drive:\path\test.xls"
            DBMS=EXCELCS REPLACE;        *Use EXCELCS, not EXCEL;

Example 2: Import Access file from 32-bit Office to 64-bit SAS.  Note use of ACCESSCS. 
            TABLE= "tablename"
            DBMS=ACCESSCS REPLACE;       *use ACCESSCS, not ACCESS;

Using LIBNAME, add PCFILES engine.

Example 3: Import Excel file from 32-bit Office to 64-bit SAS.
libname in pcfiles path="drive:\path\test.xls" ;
data test;
set in."sheetname$"n;
libname in clear;

Example 4: Import Excel file from 32-bit Office to 64-bit SAS.
libname in pcfiles path="drive:\path\test2.accdb";
data test2;
  set in.tablename;   * (Access table name must be valid SAS name) ;
libname in clear; 

For more information, see SAS/Access 9.3 Interface to PC Files Reference and SAS Usage Note 33228.





2004 University of Massachusetts Amherst. Site Policies.