Date: Tue, 15 Feb 2011 08:04:43 -0800
Reply-To: David Marso <david.marso@gmail.com>
Sender: "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From: David Marso <david.marso@gmail.com>
Subject: Re: File restucture
In-Reply-To: <4D59B321.5090004@bgu.ac.il>
Content-Type: text/plain; charset=us-ascii
Here is a similar approach to the setup code which is somewhat more direct.
Leaving out the CASESTOVARS.
DO IF ID<> LAG(ID) OR $CASENUM=1.
+ COMPUTE REFDATE=date.
+ COMPUTE RETAIN=1.
ELSE.
+ COMPUTE refdate=LAG(refdate).
+ COMPUTE DELTA=CTIME.DAYS(date-refdate).
+ DO IF (DELTA > 90).
+ COMPUTE RETAIN=1.
+ COMPUTE refdate=date.
+ END IF.
END IF.
EXE.
SELECT IF RETAIN.
MATCH FILES / FILE * / DROP refdate retain delta.
--
Add the CASESTOVARS here.
--
View this message in context: http://spssx-discussion.1045642.n5.nabble.com/File-restucture-tp3382125p3386175.html
Sent from the SPSSX Discussion mailing list archive at Nabble.com.
=====================
To manage your subscription to SPSSX-L, send a message to
LISTSERV@LISTSERV.UGA.EDU (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD
|