The SAS PC Files Server is used to convert 32-bit Microsoft Office files to SAS 64-bit files. This SAS note explains both how to install the SAS PC Files Server and how to perform the 32-bit to 64-bit conversion. Please read the instructions completely, especially before downloading the SAS PC Files Server. You should make sure that your SAS TS Level and SAS PC Files Server versions match.
Check Your Version of Microsoft Office
If you have Office 2003 or Office 2007, install the SAS PC Files Server. These versions are 32-bit.
If you have 64-bit Microsoft Office 2010, the SAS PC Files Server is not required when you are running the 64-bit version of SAS for Windows. To check your version of Office, do the following:
- Start an Office product, such as Excel. In Excel, click the File tab and then click Help in the list on the left.
- The version of Excel is shown under the About Microsoft Excel on the right.
- If you have 64-bit Excel and you are running SAS for Windows, stop here. You do not need the SAS PC Files Server.
You can use the DBMS=EXCEL option instead of the SAS PC Files Server.
- If you are running the Japanese edition of 64-bit Microsoft office, it does not work with SAS at this time.
- If you have 32-bit Excel or you are running SAS on a UNIX host or remote host, continue with the installation process for the SAS PC Files Server, below.
Checking the Version of Your SAS Software
Use these instructions to check the version of SAS that you are using.
If SAS is installed on a Windows system, do the following:
- Invoke SAS interactively by selecting Start ► All Programs ► SAS and the SAS version that is available to you.
- After SAS starts, select Help ► About.
- In the Software Information field of the dialog box, notice what your TS and M Level are and continue with the next section, "How to Install the SAS PC Files Server."
If SAS is installed on a UNIX system, enter the location of the SAS executable at a UNIX command /p>
- After SAS starts, select Help ► About .
- In the Software Information field, notice what your TS and M Level are and continue with the next section, "How to Install the SAS PC Files Server."
How to Install the SAS PC Files Server
Important: Before you begin the installation, review the following caveats and make sure that you do not have another version of the SAS PC FIles Server on your machine.
Caveats about the Different Versions of the SAS PC Files Server
Before you install the SAS 9.3 version of the SAS PC Files Server, it is essential that you review and know these important facts:
- This SAS PC Files Server is for SAS 9.3 only.
- The SAS 9.3 version of the SAS PC Files Server is not backward compatible with earlier releases of the SAS system.
- You cannot have the SAS® 9.2 and SAS 9.3 versions of the SAS PC Files Server installed on the same machine.
Checking for the Presence of an Existing SAS PC Files Server
Follow these steps to determine whether you already have the SAS PC Files Server installed:
- Open the Windows Control Panel.
- If you are using a Windows 7 or Windows 2008 machine, change the View by option in the upper right to Large icons so that you can access all of the tools.
- Click Administrative Tools. This is normally in the second column at the top.
- Double-click Services. The Services dialog box appears.
- In the Services dialog box, scroll down to SAS PC Files Server.
Note: If you do not see SAS PC Files Server in the Services panel, go to the "Installing the SAS PC Files Server" section of this note to install it. In this case, close the Services dialog box.
- Right-click SAS PC Files Server and select Stop.
- Minimize the Services dialog box.
- Select Start ► All Programs ► SAS ► SAS PC Files Server.
- In the SAS PC Files Server dialog box, select Help ► About. In SAS 9.2, you should see the version of SAS PC Files Server. In SAS 9.3, you see the version number and the bit architecture.
If you see version 9301.0.20145.58769 of the SAS PC Files Server and you have SAS 9.3 TS1M2, you can upgrade to the new SAS PC Files Server without uninstalling the earlier version. See SAS Note
47237 about how to upgrade the SAS PC Files Server.
If you see any other SAS 9.3 version of the SAS PC Files Server, uninstall the SAS PC Files Server before installing the new one. See SAS Note 45439 about how to do the uninstallation.
If you see a SAS 9.2 version of the SAS PC Files Server, uninstall it before installing the SAS 9.3 version. Use the Windows Add/Remove programs tool to do this.
- If you see the SAS 9.3 version of the SAS PC Files Server, make sure that the bit architecture matches the bit architecture of your Microsoft Office (32-bit Office and 32-bit PC Files Server) or (64-bit Office and 64-bit PC Files Server). If the bits do not match, contact SAS Technical Support for help with removing the SAS 9.3 version of the SAS PC Files Server.
- If the versions and bit architectures do match, go back to the Services dialog box and right-click SAS PC Files Server and click Start. Then go to "Using the SAS PC Files Server to Import and Export Microsoft Office Files" section, below.
Installing the SAS PC Files Server
In SAS 9.3, the SAS PC Files Server can be downloaded from the
SAS PC Files Server 9.3.
An alternative method is to use the SAS Customer Support site, as follows.
- Click support.sas.com to reach the site.
- Click Downloads & Hotfixes on the left, under Support.
- Click SAS software, under Downloads.
- Click SAS PC Files Server. Remember, this PC Files Server is for SAS 9.3 only.
Note: *** Read steps 5 and 6 carefully and completely. ***
- After you click SAS PC Files Server, you see links for three different releases of the SAS PC Files Server.
- Release 9.3 - AUG 2012 is for SAS 9.3 TS1M2.
- 93.140 11w50 - DEC 2011 is the Week 50 version, which is for SAS 9.3 TS1M1.
- 93.130 11w29 - JUL 2011 is for SAS 9.3 TS1M0.
Important: Check your SAS version (TS1M2, TS1M1, or TS1M0) to make sure that it matches. If it does not match, the SAS PC Files Server will not work. You can check your version at the top of your SAS log window or use the HELP ► About SAS menu item.
Then, choose the corresponding version to Base SAS that you have.
- In the table that appears, you see the two different SAS PC Files Servers that are available.
Neither works with SAS 9.2 TS2M3 or earlier versions of SAS. Click one of the versions, in accordance with the following:
- The Microsoft Windows for X64 option is for the 64-bit version of Office. Even if you are running an X64 platform such as Windows 7, do not choose this version if you are running the 32-bit Office.
- The Windows option is for 32-bit Office. If you are running 32-bit Office, choose this option. The 32-bit version of Office requires the Windows version of the SAS PC Files Server.
- Review the README file carefully before proceeding. There is a README file for each SAS PC Files Server. The file contains the installation instructions.
This SAS PC Files Server is for SAS 9.3 only. It does not work with SAS 9.2 TS2M3 or earlier versions.
Using the SAS PC Files Server to Import and Export Microsoft Office Files
Importing and Exporting Microsoft Office Files When SAS and the SAS PC Files Server Are on the Same Machine
The following examples illustrate how to use the SAS PC Files Server to read and write Microsoft Excel and Microsoft Access files.
If you are using the SAS PC Files Server on the same Windows X64 machine that SAS is running on, use the syntax below, where the SERVER= option is not required. If you are not running the SAS PC Files Server on the same machine as SAS, see the section "Importing and Exporting Microsoft Office Files When SAS and the SAS PC Files Server Are on Different Machines" or the section "If the SAS PC Files Server Is Running as a Manual Task," below.
Note: The ExcelCS driver can also create and update Excel 2007 and 2010 files. However, if you are creating a new Excel file, name the file with a .XLSB extension rather than the .XLS extension shown in the example.
Note: The DBMS= options are highlighted in yellow. The highlighting is to draw your attention to these changes, in case you have never used the SAS PC Files Server before.
PROC IMPORT OUT=yoursasdata
DATAFILE='drive:\yourdirectory\yourfile.xls'
DBMS= EXCELCS REPLACE;
SHEET='yoursheet';
RUN;
PROC EXPORT OUTFILE='drive:\yourdirectory\yourfile.xls'
DATA=yoursasdata
DBMS= EXCELCS REPLACE;
SHEET='yoursheet';
RUN;
To use the LIBNAME statement with an Excel file, use syntax as shown in the following example, the file extension varies depending on the type of Excel file (xls, xlsx, or xlsb) :
libname test pcfiles path='drive:\yourdirectory\yourfile.xls';
data temp1;
set test.yoursheet;
run;
libname test clear;
To import a Microsoft Access .MBD or .ACCDB database table, use the syntax as shown in the following example:
PROC IMPORT DBMS= ACCESSCS
OUT=yoursasdata REPLACE
TABLE='youraccesstable';
DATABASE='drive:\yourdirectory\yourfile.mdb';
RUN;
To export to a Microsoft Access .MDB or .ACCDB database table, use syntax as shown in the following example:
PROC EXPORT DATA=yoursasdata
OUTTABLE="youraccesstable"
DBMS= ACCESSCS REPLACE ;
DATABASE="drive:\yourdirectory\yourfile.mdb";
RUN;
To use the LIBNAME statement with a Microsoft Access file, use the following example:
libname test pcfiles path='drive:\yourdirectory\yourfile.mdb';
data temp1;
set test.youraccesstable;
run;
libname test clear;
Importing and Exporting Microsoft Office Files When SAS and the SAS PC Files Server Are on Different Machines or If the SAS PC Files Server Is Running as a Manual Task
If you are running SAS on a different machine than the SAS PC Files Server, use the following code. Note that the port and server are required because SAS and the SAS PC Files Server are on different machines.
To import an Excel file on a machine where the SAS PC Files Server is on a different machine than the SAS machine, use the code shown below:
PROC IMPORT DBMS= EXCELCS
OUT=yoursasdasta
DATAFILE='drive:\yourdirectory\yourfile.xls' REPLACE;
PORT=9621;
SERVER='yourpc.com';
SHEET='yoursheet';
RUN;
To export to an Excel file, use the code shown below.
Note: The ExcelCS driver can also create Excel 2007 and Excel 2010 files.
However, if you are creating a new Excel file, name the file with a .XLSB extension rather than the .XLS extension shown in the example.
PROC EXPORT DBMS= EXCELCS
DATA=yoursasdata
OUTFILE='drive:\yourdirectory\yourfile.xls' REPLACE;
PORT=9621 ;
SERVER='yourpc.com';
SHEET='yoursheet';
RUN;
To use the LIBNAME statement with an Excel file, use the following example, the file extension varies depending on the type of Excel file (xls, xlsx, or xlsb):
libname test pcfiles path='drive:\yourdirectory\yourfile.xls' server='yourserver' port=9621;
data temp1;
set test.yoursheet;
run;
To import a Microsoft Access file, use the code shown below:
PROC IMPORT OUT=yoursasdata
DBMS= ACCESSCS
DATATABLE='youraccesstable' REPLACE;
DATABASE='drive:\yourdirectory\yourfile.mdb' ;
SERVER="yourpcfileserver.com";
PORT=9621;
RUN;
To export to a Microsoft Access file, use the code shown below:
PROC EXPORT DATA=yoursasdata
OUTTABLE="youraccesstable"
DBMS= ACCESSCS REPLACE ;
DATABASE="drive:\yourdirectory\yourfile.mdb";
SERVER='yourpcfileserver.com';
PORT=9621;
RUN;
To use the LIBNAME statement with a Microsoft Access file, use the following example:
libname test pcfiles path='drive:\yourdirectory\yourfile.mdb' server='yourserver' port=9621;
data temp1;
set test.youraccesstable;
run;
libname test clear;
Operating System and Release Information
SAS System | SAS/ACCESS Interface to PC Files | Microsoft® Windows® for x64 | 9.3 | | 9.3 TS1M0 | |
Microsoft Windows Server 2003 for x64 | 9.3 | | 9.3 TS1M0 | |
Microsoft Windows Server 2008 for x64 | 9.3 | | 9.3 TS1M0 | |
Windows 7 Enterprise x64 | 9.3 | | 9.3 TS1M0 | |
Windows 7 Home Premium x64 | 9.3 | | 9.3 TS1M0 | |
Windows 7 Professional x64 | 9.3 | | 9.3 TS1M0 | |
Windows 7 Ultimate x64 | 9.3 | | 9.3 TS1M0 | |
Windows Vista for x64 | 9.3 | | 9.3 TS1M0 | |
64-bit Enabled AIX | 9.3 | | 9.3 TS1M0 | |
64-bit Enabled HP-UX | 9.3 | | 9.3 TS1M0 | |
64-bit Enabled Solaris | 9.3 | | 9.3 TS1M0 | |
HP-UX IPF | 9.3 | | 9.3 TS1M0 | |
Linux | 9.3 | | 9.3 TS1M0 | |
Linux for x64 | 9.3 | | 9.3 TS1M0 | |
Solaris for x64 | 9.3 | | 9.3 TS1M0 | |
*
For software releases that are not yet generally available, the Fixed
Release is the software release in which the problem is planned to be
fixed.