LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (March 2007)Back to main SPSSX-L pageJoin or leave SPSSX-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
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
Comments:   To: Richard Ristow <wrristow@mindspring.com>
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.

Cheers all

-----Original Message----- From: SPSSX(r) Discussion [mailto:SPSSX-L@LISTSERV.UGA.EDU] On Behalf Of Richard Ristow Sent: Tuesday, March 06, 2007 6:11 AM To: SPSSX-L@LISTSERV.UGA.EDU 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 clarifications:

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: > >Comp diff=total_trip_old-trip#. >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 . >end if. >end loop.

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.


Back to: Top of message | Previous page | Main SPSSX-L page