Date: Wed, 22 Oct 1997 10:16:39 -0400
Reply-To: Liming Cai <cail@WORTHEN.IHCRP.GEORGETOWN.EDU>
Sender: "SAS(r) Discussion" <SAS-L@UGA.CC.UGA.EDU>
From: Liming Cai <cail@WORTHEN.IHCRP.GEORGETOWN.EDU>
Organization: Georgetown University
Subject: Re: I'm losing data when I go from SPSS to SAS
Content-Type: multipart/alternative;
A minor correction here. The command should be:
libname tst v612 or v611 'c:\wrk';
Liming Cai wrote:
> Well, I think something is missing in Erik's code.
> The LIBNAME command should look like this:
>
> libname v612(or v611 depending on your version of SAS) tst 'c:\wrk';
>
> Jeff Wayman wrote:
>
>> Erik, thanks for the response. However, I still have the same
>> trouble
>> using this code. Strange, huh?
>>
>> In article <MPG.eaeab08af20c3a7989681@balder> erik.rasmussen@leo.dk
>> writes:
>> >Hi Jeff Wayman
>> >
>> >Have you tried proc convert ?
>> >
>> >That ought to do the trick.
>> >
>> >Below is my example of such a conversion (using SAS for Windows
>> 6.12):
>> >
>> >THE SAS PROGRAMME SPSS2SAS.SAS:
>> >
>> >/* the (sub)directory for your resulting SAS dataset*/
>> >libname tst 'c:\wrk';
>> >
>> >/* define the input SPSS datafile*/
>> >filename filein 'c:\wrk\mastis.por';
>> >
>> >/* here comes the conversion*/
>> >proc convert spss=filein out=tst.mastis;
>> >run;
>> >
>> >
>> >
>> >
>> >AND THE MAIN PART OF THE LOG-FILE:
>> >
>> >NOTE: AUTOEXEC processing completed.
>> >
>> >1 /* the (sub)directory for your resulting SAS dataset*/
>> >2 libname tst 'c:\wrk';
>> >NOTE: Libref TST was successfully assigned as follows:
>> > Engine: V612
>> > Physical Name: C:\wrk
>> >3
>> >4 /* define the input SPSS datafile*/
>> >5 filename filein 'c:\wrk\mastis.por';
>> >6
>> >7 /* here comes the conversion*/
>> >8 proc convert spss=filein out=tst.mastis;
>> >9 run;
>> >
>> >NOTE: SPSS Portable File (Creation Date=15OCT97:10:08:21).
>> >NOTE: File label: 'SPSS Portable File written by Data Entry'.
>> >NOTE: The data set TST.MASTIS has 99 observations and 120
>> variables.
>> >NOTE: Compressing data set TST.MASTIS decreased size by 55.56
>> percent.
>> > Compressed is 4 pages; un-compressed would require 9 pages.
>> >NOTE: The PROCEDURE CONVERT used 1.26 seconds.
>> >
>> >
>> >10
>> >
>> >NOTE: SAS Institute Inc., SAS Campus Drive, Cary, NC USA 27513-2414
>>
>> >
>> >[END OF LOG-FILE]
>> >
>> >
>> >Kind regards
>> >Erik M Rasmussen
>> >Leo Pharmaceutical Products
>> >Med.Dept.
>> >
>> >
>> >
>> >[This followup was posted to comp.soft-sys.sas and a copy was sent
>> to the
>> >cited author.]
>> >
>> >In article <620kmv$ae12@lamar.ColoState.EDU>,
>> wayman@lamar.ColoState.EDU
>> >says...
>> >> Hi -
>> >>
>> >> I'm trying to use SAS to read an SPSS portable file. Here is
>> >> the SAS syntax I used:
>> >>
>> >> LIBNAME translat SPSS 'c:\sas\sasuser\try.por';
>> >> libname sasbase 'c:\sas\sasuser';
>> >> data sasbase.try;
>> >> set translat.try;
>> >> run;
>> >>
>> >> On the SPSS side, the data is fine. However, when I look at the
>> SAS data
>> >> file, some of the variables are fine, but others only contain
>> missing
>> >> values. I thought it might be a problem with formatting, but I
>> see no
>> >> pattern on the missing variables which indicates formatting
>> problems.
>> >> Any ideas?
>> >
>> >
>> >
>> >
>> >>
>> >> Thanks!
>> >>
>> >> --
>> >> Jeff Wayman wayman@lamar.colostate.edu
>> >>
>> >> "Baseball is like church - many attend, few understand."
>> >> - Wes Westrum
>> >>
>>
>> --
>> Jeff Wayman wayman@lamar.colostate.edu
>>
>> "Baseball is like church - many attend, few understand."
>> - Wes Westrum
>
>
>
> --
>
> Liming Cai
> Research Associate
> Georgetown University
> Tel: (202) 687-0859
>
--
Liming Cai
Research Associate
Georgetown University
Tel: (202) 687-0859
[text/html]
|