Date: Tue, 11 Jul 2006 15:01:26 +0100
Sender: "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From: "John S. Lemon" <email@example.com>
Organization: University of Aberdeen, Scotland
Subject: Re: Easy problem
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
> I have an easy problem (I reckon). I need to generate a variable which
> basically repeats the numbers 1, 2, 3. In other words, I have a data file
> in which each individual has three records (cases) and I just need to mark
> up the different records as 1, 2, 3. Could someone tell me how to do this
Try this syntax code ( untested ).
COMPUTE COUNTER = 1.
IF ( ( MOD ( $CASENUM, 2 ) ) EQ 0 ) COUNTER = 2.
IF ( ( MOD ( $CASENUM, 3 ) ) EQ 0 ) COUNTER = 3.
Hope this helps
John S. Lemon Mailto:firstname.lastname@example.org
DISS - ASD (Computing) Tel: +44 1224 273350
Aberdeen University - Scotland