Date: Wed, 18 Dec 2002 14:06:57 -0500
Reply-To: "Hetter, Rebecca D,, DMDCWEST" <HETTERRD@osd.pentagon.mil>
Sender: "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From: "Hetter, Rebecca D,, DMDCWEST" <HETTERRD@osd.pentagon.mil>
Subject: Re: Isolating a variable
Content-Type: text/plain
Sharon,
Using "save outfile" with the subcommand "keep=" is one way to do it.
Let the variable to be kept be "MYVAR" and "KEPT.SAV" an SPSS system file
that will contains just this variable. The syntax is:
SAVE OUTFILE KEPT.SAV/KEEP= MYVAR .
To read this file you would use:
GET FILE KEPT.SAV .
If you would like to also keep an ID for each record, then
SAVE OUTFILE KEPT.SAV/KEEP= ID MYVAR .
If you prefer to save the variable in a text file:
WRITE OUTFILE KEPT.TXT/ MYVAR * .
EXECUTE.
Rebecca D. Hetter
Personnel Testing Division
Defense Manpower Data Center
400 Gigling Rd, Seaside, CA 93955
(831) 583-2400 Ext 4231
> -----Original Message-----
> From: Sharon Jones [SMTP:sjones@informingchange.com]
> Sent: Wednesday, December 18, 2002 10:23 AM
> To: SPSSX-L@LISTSERV.UGA.EDU
> Subject: Isolating a variable
>
> I would like to take one variable out of a large data set for merging with
> another dataset. I tried to delete all of the other variables in the
> file,
> thus creating a new file with just that variable, but SPSS keeps crashing.
> Does someone have some syntax to do this?
>
> Thanks,
> Sharon
|