Date: Tue, 14 Oct 2003 11:20:02 -0400
Reply-To: Randy Herbison <RandyHerbison@WESTAT.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Randy Herbison <RandyHerbison@WESTAT.COM>
Subject: Re: a question of export SAS data to SPSS
Both SAS and SPSS (tested with Release 11.0.1) will automatically rename the
variables with long names. SAS also maps the renaming in the SAS log, and
if a renamed variable doesn't have a label, creates one using the full
56 options VALIDVARNAME=V7;
58 data __afapps.test;
61 label abcdefghijkl='Test';
NOTE: The data set __AFAPPS.TEST has 1 observations and 2 variables.
NOTE: DATA statement used:
real time 0.01 seconds
cpu time 0.01 seconds
64 options VALIDVARNAME=V6;
66 libname xpt xport "c:\temp\test.xpt";
NOTE: Libref XPT was successfully assigned as follows:
Physical Name: c:\temp\test.xpt
68 proc copy in=__afapps out=xpt memtype=data;
69 select test;
NOTE: Copying __AFAPPS.TEST to XPT.TEST (memtype=DATA).
NOTE: The variable name abcdefghijkl has been truncated to abcdefgh.
NOTE: The variable name v123456789 has been truncated to v1234567.
NOTE: The variable v1234567 now has a label set to v123456789.
NOTE: There were 1 observations read from the data set __AFAPPS.TEST.
NOTE: The data set XPT.TEST has 1 observations and 2 variables.
NOTE: PROCEDURE COPY used:
real time 0.14 seconds
cpu time 0.06 seconds
From: miranda [mailto:mixiao@UCLA.EDU]
Sent: Monday, October 13, 2003 4:57 PM
Subject: a question of export SAS data to SPSS
Does anyone know how to solve variable length longer than 8 when exporting
SAS data set to SPSS ? SPSS only keep the first 8 characters. Thanks.