LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (October 2003, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
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
Comments: To: miranda <mixiao@UCLA.EDU>
Content-Type: text/plain

Miranda,

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 original name.

56 options VALIDVARNAME=V7; 57 58 data __afapps.test; 59 abcdefghijkl=1; 60 v123456789=1; 61 label abcdefghijkl='Test'; 62 run;

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

63 64 options VALIDVARNAME=V6; 65 66 libname xpt xport "c:\temp\test.xpt"; NOTE: Libref XPT was successfully assigned as follows: Engine: XPORT Physical Name: c:\temp\test.xpt 67 68 proc copy in=__afapps out=xpt memtype=data; 69 select test; 70 run;

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

RandyHerbison@westat.com

-----Original Message----- From: miranda [mailto:mixiao@UCLA.EDU] Sent: Monday, October 13, 2003 4:57 PM To: SAS-L@LISTSERV.UGA.EDU Subject: a question of export SAS data to SPSS

Hi, 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.


Back to: Top of message | Previous page | Main SAS-L page