id nums

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

id nums

DianeG Cohen
Hi all,

I have a list of 300 residents, and each needs a unique id number for a
software data entry program I use.

I create the data base in SPSS then save it in Excel.

Numbering scheme - variable is called USERID.
 RES differentiates this testing group as Residents.  I also have NUR
(nurses) MEDS (medical students), etc.
RES08001 is the first resident; RES08300 is the last resident.
08 indicates this year's group - last year the first resident was RES07001.


I copied and pasted all of the RES07001 id numbers into the RES08001 data
base.  I am now going into each id num and deleting the 7 and replacing it
with an 8.  But I'd sure love it if I could have a syntax to change the 7 to
an 8 without changing the rest of the id nums...any ideas?

I think one of the problems is that I use alpha and numeric in the id
number, right?

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD
Reply | Threaded
Open this post in threaded view
|

Re: id nums

Maguin, Eugene
Diane,

Look at the substr function in the universals section of the syntax
reference. You can do this, which is what you want with it.

Compute substr(userid,5,1)='7'.

You might find this usefule for other things as well.


>>Numbering scheme - variable is called USERID.
 RES differentiates this testing group as Residents.  I also have NUR
(nurses) MEDS (medical students), etc.
RES08001 is the first resident; RES08300 is the last resident.
08 indicates this year's group - last year the first resident was RES07001.

>>I copied and pasted all of the RES07001 id numbers into the RES08001 data
base.  I am now going into each id num and deleting the 7 and replacing it
with an 8.  But I'd sure love it if I could have a syntax to change the 7 to
an 8 without changing the rest of the id nums...any ideas?

Gene Maguin

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD
Reply | Threaded
Open this post in threaded view
|

Re: id nums

Bob Walker-2
In reply to this post by DianeG Cohen