I've had a tough time getting a simple loop to work in SPSS that isn't based on variables.
In a nutshell, I want to write
!sequentialVars varStr=/Var/ i=/20/.
or similar and get: Var1 Var2 Var3 Var4 Var5 ... Var19 Var20 to put into a cTable or anywhere else that takes a string of variable names.
In pseudo VB it would be:
varString = "AnyVarName"
for i=1 to 20
newVarList = concatenate(newVarList," ",varString, i)
next i
I can't even echo back the i in an SPSS loop, let alone concatenate it.
Thank you!
VAR1 to VAR50
etc. – Andy W