Date: Thu, 9 Jan 1997 14:14:14 PST
Reply-To: Melvin Klassen <KLASSEN@UVVM.UVIC.CA>
Sender: "SPSSX(r) Discussion" <SPSSX-L@UGA.CC.UGA.EDU>
From: Melvin Klassen <KLASSEN@UVVM.UVIC.CA>
Subject: Re: renaming multiple variables
Gloria Edwards <gsedward@HAMLET.UNCG.EDU> writes:
>I have a client who wants to merge three datasets. The problem is that
>the datasets have duplicate variable names (e.g., v1-v225) that represent
>different things in each dataset. Therefore, the variables need to be
>renamed before merging.
>Is there a way to rename multiple variables in SPSS without specifying
>each variable individually? The datasets are so large that individual
>renames would be extremely cumbersome, but the menu options in SPSS Win
>7.0 didn't appear to provide a work around. Can we do this with syntax?
MATCH FILES FILE= handle1 /
RENAME= (V1 TO V225 = A1 TO A225) /
IN = INA /
FILE= handle2 /
RENAME= (V1 TO V225 = B1 TO B225) /
IN = INB /
BY varlist /
SELECT IF (INA AND INB) /* Select only "matching" cases. */
QED.
|