Why use proc convert?
The following will read in a SAS file (okay, so I did it for a SAS .xpt
file, but I think it will work on all SAS files? )
libname xxx spss 'C:\Projects\rawdata\spssfile1.por'; *FULL
libname anal 'C:\Projects\analysis_datasets'; *folder
location where data will be stored;
Data anal.sasfile1; *saves file (named sasfile1) in SAS format
in location defined above;
set xxx.data; *sets file from SPSS into that file;
> From: Anders J[SMTP:anderj@STUD.NTNU.NO]
> Reply To: Anders J
> Sent: Wednesday, December 01, 2004 9:52 AM
> To: SAS-L@LISTSERV.UGA.EDU
> Subject: PROC CONVERT spss. Too long variable names from SPSS to SAS
> I need to import a spss data file into SAS. I works just fine except
> from the the spss variable names being longer than eight characters
> and are thus renamed to a length of eight in SAS.
> Does anybody know how I can circumvent this problem? I need variable
> names of at least length 25 characters. By the way I'm using SAS 9.1!
> This is my code:
> filename myfile 'C:\bank\test.por';
> proc convert spss=myfile out=work.vv;