|Date: ||Thu, 8 Mar 2007 02:30:20 +0530|
|Reply-To: ||Manmit Shrimali <MShrimali@marketrx.com>|
|Sender: ||"SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>|
|From: ||Manmit Shrimali <MShrimali@marketrx.com>|
|Subject: ||Re: Looping and merging syntax support|
|Content-Type: ||text/plain; charset="us-ascii"|
Richard and all:
Thanks very much for syntax help. I wish you could see how many if
statements I will not write due to loop.
Thanks Richard for your input. Really appreciate it.
Also, do repeat works fine as well.
From: SPSSX(r) Discussion [mailto:SPSSX-L@LISTSERV.UGA.EDU] On Behalf Of
Sent: Tuesday, March 06, 2007 6:11 AM
Subject: Re: Looping and merging syntax support
At 06:38 PM 3/5/2007, Manmit Shrimali wrote:
Your question comes through hard to understand. Let me ask for some
You have two files for the same respondents,
To start with: How many records in each file, for each respondent? Can
it be more than one?
Then, are you trying to end up with one record per respondent, or more?
If you can, give us the EXACT list of variables in your two files.
>Problem: I need to merge the data file 1 with data file 2.
>How to do that? This is what I have so far:
>vector hotel_old= hotel_a_5 to hotel_b_1.
>vector hotel_new= hotel_a_5_new to hotel_b_1_new.
>loop #A=1 to 26.
>do if diff=1.
>comp hotel_old (#a)= hotel_a_5_new .
The problem is, this has nothing to do with merging the files. That may
be a MATCH FILES or an ADD FILES, depending on what your files look
like, and what you want.