Mea culpa. While the save file can handle variable names longer than 8
characters, further examination of help clearly says that "Variable names
are limited to eight bytes and are automatically converted to eight byte
names if necessary", just as you described.
Nuts. If you can have variable names longer than 8 characters in SPSS,
seems like you should be able to save them as same in a portable file.
Necia A. Black, Ph.D. e-mail: firstname.lastname@example.org
246 Computing Center Web URL:http://www.acsu.buffalo.edu/~black
SUNY-Buffalo FAX: (716) 645-3734
Buffalo, New York 14260 Phone: (716) 645-3572
On 1 Dec 2004, Gerstle, John wrote:
> Another idea may be to create a comma-delimited file from the SPSS
> dataset to read into SAS. Or use DBMS/Copy.
> John Gerstle
> CDC Information Technological Support Contract (CITS)
> >> -----Original Message-----
> >> From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of
> >> Neerav
> >> Sent: Wednesday, December 01, 2004 11:01 AM
> >> To: SAS-L@LISTSERV.UGA.EDU
> >> Subject: Re: PROC CONVERT spss. Too long variable names from SPSS to
> >> Anders,
> >> I have also had the same problem converting SPSS to SAS with the
> >> variable names being truncated. The only solution I could find is by
> >> renaming the variables manually to names 8 characters long, then
> >> importing it and renaming it into SAS. I believe that SPSS
> >> automatically truncates the variable names to 8 characters when
> >> creating portable files, its something to check out and thats where
> >> problem is.
> >> Also, you should make sure your SPSS datafile does not have any 'user
> >> defined' missing values (e.g. -1=N/A) as SAS will read all missing
> >> values as system missing "." and you will lose those definitions.
> >> this helps.
> >> Neerav