Take a look at DO REPEAT in Help. That
plus the TO keyword
should do it.
From: SPSSX(r)
Discussion [mailto:[hidden email]] On
Behalf Of Noel
Sent: Tuesday, March 02, 2010 9:05 PM
To: [hidden email]
Subject: Running loops?
Hi
Everyone.
I am not sure if I am making this more complicated than need be. I am working
with a data set that requires the same computation to create a new variable
across about 610 variables. I wrote a macro for it and then realized that none
of my documentation/ manuals address not having to write out the variable
names, short of running a loop. On the SPSS tools.net site I saw that you can
run a macro for a series of variables without a loop but I am not seeing the
application.
The set up...
Var1 ... Var610
Compute ... Where VarXFTE is the new variable.
VarXFTE = FTE * (VarX /100)
Any insight? Thank you.
Noel
No virus found in this incoming message.
Checked by AVG - www.avg.com
Version: 9.0.733 / Virus Database: 271.1.1/2718 - Release Date: 03/02/10 13:34:00