From: "Neila Nessa" Subject: Re: Using macros for variable lists Date: May 30, 2003 8:11 AM Hi, This doesn't really explain the problem, but poses a possible general solution. Use !EVAL within the DO REPEAT. To do this wrap the code fragment as another macro. Then stuff works. I use Macros in much of my work. Never ran into this exact problem before. HTH, Neila ---------- sample of what I am talking about. DEFINE mylist1 () var1 var3 var5 var7 !ENDDEFINE. DEFINE mylist2 () var2 var4 var6 var8 !ENDDEFINE. DEFINE WRAPIT () DO REPEAT V = !EVAL(MYLIST1) /W = !EVAL(MYLIST2). compute X = V*W . END REPEAT PRINT . !ENDDEFINE . SET PRINTBACK ON MPRINT ON. data list free /var1 to var8 . begin data 3 3 7 6 1 2 3 7 8 6 1 2 7 8 3 6 1 7 8 3 2 end data . WRAPIT . 155 M> WRAPIT . 156 M> 157 M> . 158 M> DO REPEAT V = VAR1 VAR3 VAR5 VAR7 /W = VAR2 VAR4 VAR6 VAR8. 159 M> COMPUTE X = V*W. 160 M> END REPEAT PRINT 161 M> . 161 +COMPUTE X = VAR1*VAR2 162 +COMPUTE X = VAR3*VAR4 163 +COMPUTE X = VAR5*VAR6 164 +COMPUTE X = VAR7*VAR8 Bruce Weaver wrote in message news:... > Hello group, > > One of my colleagues ran into some unexpected behaviour by SPSS when using > macros for variable lists in DO REPEAT statements etc. FWIW, a summary of > his observations is available here: > > http://www.angelfire.com/wv/bwhomedir/spss/macros_for_var_lists.txt > > Cheers,