Date: Wed, 7 Sep 2005 18:25:24 +0200
Reply-To: Spousta Jan <JSpousta@CSAS.CZ>
Sender: "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From: Spousta Jan <JSpousta@CSAS.CZ>
Subject: Re: Converting SPSS value labels to SAS format
Content-Type: text/plain; charset="us-ascii"
Hi Pat,
You can edit the .sas file and I do not see why you should have the SAS
formats with only 8 characters... In any case, this seems to be a SAS
problem, not an SPSS one. If the exported SAS dataset is valid, you can
do with it all what SAS allows.
If needed, try to search/address
http://listserv.uga.edu/archives/sas-l.html - our sister list for SAS.
Greetings
Jan
-----Original Message-----
From: Patricia.Cleland@edu.gov.on.ca
[mailto:Patricia.Cleland@edu.gov.on.ca]
Sent: Wednesday, September 07, 2005 6:17 PM
To: Spousta Jan
Subject: RE: Converting SPSS value labels to SAS format
Thanks. My colleague was able to import the data into SAS. The var
labels were fine. The only problem that we had was that value labels
were truncated to 8 characters wide. Is there a way around that or do I
need to be more economical with the value labels?
Pat
-----Original Message-----
From: Spousta Jan [mailto:JSpousta@CSAS.CZ]
Sent: August 31, 2005 3:31 AM
To: Patricia.Cleland@edu.gov.on.ca; SPSSX-L@LISTSERV.UGA.EDU
Subject: RE: Converting SPSS value labels to SAS format
Hi Pat,
I think that the problem is that you omitted the second part ot the
export,
that is the *.sas file with the definitions of formats. E.g.
GET
FILE='C:\Program Files\SPSS\Cars.sav'.
SAVE TRANSLATE OUTFILE='C:\Program Files\SPSS\cars.sas7bdat'
/TYPE=SAS /VERSION=7 /PLATFORM=WINDOWS /MAP /REPLACE
/VALFILE='C:\Program Files\SPSS\cars.sas' .
And you should send both cars.sas7bdat and cars.sas to your colleagues.
The second problem is that my SAS sometimes does not accept SPSS
exported
files in PROCs - so I use them first in an empty DATA step:
data myfile;
set myfile;
run;
...and then is the SAS file OK for all purposes.
HTH
Jan
-----Original Message-----
From: Patricia.Cleland@edu.gov.on.ca
[mailto:Patricia.Cleland@edu.gov.on.ca]
Sent: Tuesday, August 30, 2005 5:53 PM
To: Spousta Jan; SPSSX-L@LISTSERV.UGA.EDU
Subject: RE: Converting SPSS value labels to SAS format
I too am having problems exporting from SPSS13 to SAS.
I followed Jan's instructions below and generated a .sas7bdat file.
Here's
the edited pasted syntax:
SAVE TRANSLATE OUTFILE='path and filename.sas7bdat'
/TYPE=SAS /VERSION=7 /PLATFORM=WINDOWS /MAP /REPLACE .
When I gave the file to my colleague with SAS he was able to read it
into
SAS OK, but when he tried to run Proc Freq he got the following error
message:
24 proc freq data=filename;run;
ERROR: Format Grade_Ta not found or couldn't be loaded for variable
Grade_Taught.
ERROR: Format Classes_ not found or couldn't be loaded for variable
Classes_Grade.
ERROR: Format Years_TA not found or couldn't be loaded for variable
Years_Taught. . . .
NOTE: The SAS System stopped processing this step because of errors.
He's running SAS9.
He can read in a .por file but the long variable names are truncated and
the
value labels disappear.
Any suggestions would be appreciated.
Pat
-----Original Message-----
From: SPSSX(r) Discussion [mailto:SPSSX-L@LISTSERV.UGA.EDU] On Behalf Of
Spousta Jan
Sent: August 29, 2005 11:17 AM
To: SPSSX-L@LISTSERV.UGA.EDU
Subject: Re: Converting SPSS value labels to SAS format
Hi Parveen,
* File -> Save As...
* select the sas7bdat type of file, write a name of saved file
* check the box "save value labels into a sas file" - it will create the
file with labels for you
Greetings
Jan
-----Original Message-----
From: SPSSX(r) Discussion [mailto:SPSSX-L@LISTSERV.UGA.EDU] On Behalf Of
Parveen Sharma
Sent: Monday, August 29, 2005 4:47 PM
To: SPSSX-L@LISTSERV.UGA.EDU
Subject: Converting SPSS value labels to SAS format
Dear list,
I am trying to convert SPSS dataset to SAS format. The only problem I
am
having is to convert value labels from SPSS to SAS format. Do we have
any
utilities or easy methods to convert SPSS value labels to SAS format?
The
only way for me is to manually code value labels in SAS format.
Regards,
Parveen