LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (December 2002)Back to main SPSSX-L pageJoin or leave SPSSX-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
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
Comments: To: Sharon Jones <sjones@informingchange.com>
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


Back to: Top of message | Previous page | Main SPSSX-L page