I have two sets of 8 variables each. I want to multiply the first(second, third etc.) element of each list and sum up the products. So far my attempt is this:
DO REPEAT
set1 = var1 to var8.
set2 = varA to VarH.
compute sum_of_products = SUM(set1 * set2).
END REPEAT.
EXECUTE.
The Error I get is (roughly translated from german):
Error code 4285 in row 38. String: set2
Wrong variable name: either name is longer than 64 chars or he is not defined by a previous command.
Execution of this command has been stopped.
I assume the problem is, that my DO REPEAT does not properly wrap around the commands, but I was not able to manage the right solution with the documentary, as well as with google search. These DO REPEATS and LOOPS really give me a headache.