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 (September 2005)Back to main SPSSX-L pageJoin or leave SPSSX-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Thu, 15 Sep 2005 23:18:34 +0200
Reply-To:     Roland van der Laak <rwvanderlaak@hotmail.com>
Sender:       "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From:         Roland van der Laak <rwvanderlaak@hotmail.com>
Subject:      creating new respondentcode based on country-variable
Content-Type: text/plain; charset="iso-8859-1"

Hi list,

I've got the following challenge:

- repeating projects in several countries - original respondentcodes (unique key) have a range from 1 - 1070000000 (no system per country whatsoever, only thing is that every respondent has a unique number in this range) - client wants to have other respondentcodes, 6 positions max. The range(s) should be per country, e.g.: country 1 range 1-99999 , country 2 range 100000-199999, etc. - preferably there should be a system where the transformation of the 'old/original' respondentcode should always lead to the same 'new' respondentcode, independent of the number of respondents in datafile, way the datafile is sorted etc. - solution should be as general as possible, as we will have lots of projects where we will have this issue.

example data (before transformation/without new desired unique respondentcode):

DATA LIST LIST / coderesp (f10.0) country (f1.0). BEGIN DATA.

1 1

2 2

3 3

100 1

200 2

900 3

1013 1

1015 2

200000 3

34234234 1

94584545 2

1067804002 1

1067806267 2

1067806886 3

1067806928 1

1067807364 2

1067808740 3

1067813733 1

1067816486 2

1067816614 3

1067817859 1

END DATA.

Any ideas?

Thanks in advance,

kind regards,

Roland van der Laak


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