File Format-Specific Reference for the IMPORT and EXPORT Procedures |
SAV File Essentials |
All versions of SPSS under Microsoft Windows are supported. SPSS files have a .sav file extension. SPSS files that have short variable names are exported.
See: Example 1: EXPORT a SAS Data Set to an SPSS SAV File
SPSS Data Types |
Importing and Exporting Data in SPSS Files |
PC Files Server (DBMS=PCFS) |
This IMPORT|EXPORT method uses the client/server model to access data in Stata files on Microsoft Windows from Linux, UNIX, or Microsoft Windows 64-bit operating environments. This method requires running the PC Files Server on Microsoft Windows.
|
IMPORT Procedure and the EXPORT Procedure Supported Syntax |
When importing an SPSS file, SAS saves value labels to a specified SAS format catalog. When exporting a SAS data set to an SPSS file, SAS writes the specified SAS format catalog to the SPSS file.
This example exports the SAS data set SDF.CUSTOMER, to the SPSS file, CUSTOMER.SAV, on a local system.
LIBNAME SDF "&sasdir"; PROC EXPORT DATA=SDF.CUSTOMER FILE="&tmpdir.customer.sav" DBMS=SPSS REPLACE; RUN;
This example imports data from customer.sav, on a local system, to the SAS data set WORK.CUSTOMER.
PROC IMPORT OUT=WORK.CUSTOMER FILE="&tmpdir.customer.sav" DBMS=SPSS REPLACE; RUN;
This example exports a SAS data set named SDF.CUSTOMER to an SPSS file named CUSTOMER.SAV. Note that SAS is running on the UNIX operating platform. The SPSS file is loaded on Microsoft Windows where PC Files Server is running.
LIBNAME SDF "&sasdir"; PROC EXPORT DATA=SDF.CUSTOMER FILE="&tmpdir.customer.sav" DBMS=PCFS REPLACE; SERVER="&server"; RUN;
This example imports data from an SPSS file named CUSTOMER.SAV to a SAS data set named WORK.CUSTOMER. Note that SAS is running on a UNIX platform. The SPSS file is located on Microsoft Windows where PC Files Server is running.
PROC IMPORT OUT= WORK.CUSTOMER FILE="&tmpdir.customer.sav" DBMS=PCFS REPLACE; SERVER="&server"; RUN;
Copyright © 2010 by SAS Institute Inc., Cary, NC, USA. All rights reserved.