Problem Note 42772: Support for formats and value labels when reading and writing to SPSS (.sav) data sets
SPSS (.sav) files contain value labels that are similar to formats in SAS data sets. The IMPORT and EXPORT procedures have various levels of support for value labels depending on the release of SAS® software.
If you are running SAS® 9.2 TS2M3, both numeric and character formats are supported with the addition of the hot fix found on the Hot Fix tab.
A sample is shown here:
libname mytest "c:\public\";
proc format;
value $tx2f 'A'='3A' 'B'='2B' 'C'='1C';
run;
/* STEP TWO */
/* EXPORT to sav file */
proc export data=mytest.tx
outfile="c:\tx.sav"
dbms=sav replace;
fmtlib=work.formats;
run;
proc import out=mytest.tximp
datafile="c:\tx.sav"
dbms=sav replace;
run;
If you are running a SAS® 9.2 prior to TS2M3, numeric formats are supported as value labels in PROC EXPORT only via the FMTLIB feature. Contact Technical Support for character format support.
SAS® 9.1.3 does not support this feature.
Operating System and Release Information
SAS System | SAS/ACCESS Interface to PC Files | Microsoft® Windows® for 64-Bit Itanium-based Systems | 9.2 TS2M3 | 9.2 TS2M3 |
Microsoft Windows Server 2003 Datacenter 64-bit Edition | 9.2 TS2M3 | 9.2 TS2M3 |
Microsoft Windows Server 2003 Enterprise 64-bit Edition | 9.2 TS2M3 | 9.2 TS2M3 |
Microsoft Windows XP 64-bit Edition | 9.2 TS2M3 | 9.2 TS2M3 |
Microsoft® Windows® for x64 | 9.2 TS2M3 | 9.2 TS2M3 |
Microsoft Windows Server 2003 Datacenter Edition | 9.2 TS2M3 | 9.2 TS2M3 |
Microsoft Windows Server 2003 Enterprise Edition | 9.2 TS2M3 | 9.2 TS2M3 |
Microsoft Windows Server 2003 Standard Edition | 9.2 TS2M3 | 9.2 TS2M3 |
Microsoft Windows Server 2003 for x64 | 9.2 TS2M3 | 9.2 TS2M3 |
Microsoft Windows Server 2008 | 9.2 TS2M3 | 9.2 TS2M3 |
Microsoft Windows Server 2008 for x64 | 9.2 TS2M3 | 9.2 TS2M3 |
Microsoft Windows XP Professional | 9.2 TS2M3 | 9.2 TS2M3 |
Windows 7 Enterprise 32 bit | 9.2 TS2M3 | 9.2 TS2M3 |
Windows 7 Enterprise x64 | 9.2 TS2M3 | 9.2 TS2M3 |
Windows 7 Home Premium 32 bit | 9.2 TS2M3 | 9.2 TS2M3 |
Windows 7 Home Premium x64 | 9.2 TS2M3 | 9.2 TS2M3 |
Windows 7 Professional 32 bit | 9.2 TS2M3 | 9.2 TS2M3 |
Windows 7 Professional x64 | 9.2 TS2M3 | 9.2 TS2M3 |
Windows 7 Ultimate 32 bit | 9.2 TS2M3 | 9.2 TS2M3 |
Windows 7 Ultimate x64 | 9.2 TS2M3 | 9.2 TS2M3 |
Windows Vista | 9.2 TS2M3 | 9.2 TS2M3 |
Windows Vista for x64 | 9.2 TS2M3 | 9.2 TS2M3 |
64-bit Enabled AIX | 9.2 TS2M3 | 9.2 TS2M3 |
64-bit Enabled HP-UX | 9.2 TS2M3 | 9.2 TS2M3 |
64-bit Enabled Solaris | 9.2 TS2M3 | 9.2 TS2M3 |
HP-UX IPF | 9.2 TS2M3 | 9.2 TS2M3 |
Linux | 9.2 TS2M3 | 9.2 TS2M3 |
Linux for x64 | 9.2 TS2M3 | 9.2 TS2M3 |
Solaris for x64 | 9.2 TS2M3 | 9.2 TS2M3 |
*
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.
This usage note describes what happens when reading value labels in SPSS to SAS format libraries and exporting formats to value labels in SPSS.
Type: | Problem Note |
Priority: | medium |
Date Modified: | 2011-03-30 11:56:17 |
Date Created: | 2011-03-24 14:52:37 |