* Create an id using name and date of birth. * Ray SPSSX-L 2003/01/09. DATA LIST LIST /lastname firstnam (2A15) dob(SDATE). BEGIN DATA Smith John 2000/1/1 Raffe Sydelle 2001/7/7 Poppins Marry . Doe Art 2001/8/17 END DATA. LIST. STRING id(A18). COMPUTE id=CONCAT( SUBSTR(lastname,1,4), SUBSTR(firstnam,1,4), STRING(dob,ADATE10) ). * If want to remove the two "/". LOOP IF INDEX(id,"/")>0. COMPUTE id=CONCAT(SUBSTR(id,1,INDEX(id,"/")-1),SUBSTR(id,INDEX(id,"/")+1)). END LOOP. LIST id. * This is the output: ID SmitJohn01012000 RaffSyde07072001 PoppMarr . Doe Art 08172001