yes and yes
Assuming IDs are strings:
string newID (a50). /*or whatever length is necessary.
compute newID=concat(rtrim(idvar1), (idvar2)).
sort cases by var1 var2.
Rick Oliver
Senior Information Developer
IBM Business Analytics (SPSS)
E-mail:
[hidden email]From: stace swayne <
[hidden email]>
To:
[hidden email],
Date: 10/15/2013 01:38 PM
Subject: altering a variable in SPSS
Sent by: "SPSSX(r) Discussion" <
[hidden email]>
Dear Listserv,
I have two questions regarding data manipulation
The first question is: Is it possible to concatenate variables in SPSS:
for example I have a household ID and a person ID and I would like to
combine them together.
The second question is: Is it possible to sort on two variables
simultaneously: for example sorting on household ID and person ID at the
same time.
All suggestions are welcomed.