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 (August 2002)Back to main SPSSX-L pageJoin or leave SPSSX-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Fri, 23 Aug 2002 23:19:26 -0400
Reply-To:     Raynald Levesque <rlevesque@videotron.ca>
Sender:       "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From:         Raynald Levesque <rlevesque@videotron.ca>
Subject:      Re: Assigning new ID
In-Reply-To:  <3D6693C4.3090300@umich.edu>
Content-Type: text/plain; charset="us-ascii"

Hi

Try this:

DATA LIST LIST /ssn newid. BEGIN DATA 123456 100 222222 200 150150 300 END DATA. LIST.

SORT CASES BY ssn. SAVE OUTFILE='c:\temp\keys.sav'.

DATA LIST LIST /ssn var1. BEGIN DATA 123456 27 222222 32 222222 49 222222 49 150150 57 150150 67 END DATA. LIST.

SORT CASES BY ssn. MATCH FILES FILE=* /TABLE='c:\temp\keys.sav' /BY=ssn /DROP=ssn.

* Move the newid to the first column. ADD FILES FILE=* /KEEP=newid ALL.

Have fun!

Raynald Levesque rlevesque@videotron.ca Visit my SPSS Pages http://pages.infinit.net/rlevesqu/index.htm

-----Original Message----- From: SPSSX(r) Discussion [mailto:SPSSX-L@LISTSERV.UGA.EDU]On Behalf Of Steve Peck Sent: August 23, 2002 3:58 PM To: SPSSX-L@LISTSERV.UGA.EDU Subject: Assigning new ID

Can someone point me to syntax that will allow me to assign a new (known) id number (contained in a file with idnum and ss#) to a new file (w/multiple and varying numbers of lines per case, all lines starting w/ their ss#)?

thanks, Steve

-- Stephen C. Peck Senior Research Associate Social Science University of Michigan 204 S. State St. # 1239 Ann Arbor, MI 48109-1290 (734) 647-3683; fax (734) 936-7370 link@umich.edu


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