f



Re: PROC CONVERT spss. Too long variable names from SPSS to SAS #3

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)
Biostatistician


>> -----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
SAS
>>
>> 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
the
>> 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.
Hope
>> this helps.
>>
>> Neerav
0
yzg9 (334)
12/1/2004 4:10:00 PM
comp.soft-sys.sas 142827 articles. 4 followers. Post Follow

1 Replies
1046 Views

Similar Articles

[PageSpeed] 6

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.
Cheers,
                                                                                
Necia A. Black, Ph.D.     	e-mail:  black@buffalo.edu      
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)
> Biostatistician
> 
> 
> >> -----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
> SAS
> >>
> >> 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
> the
> >> 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.
> Hope
> >> this helps.
> >>
> >> Neerav
> 
> 

0
black5767 (17)
12/1/2004 9:22:17 PM
Reply: