Hello,

while trying some thing out, I got an error message for the following loop:

local recode2 herkun1 herkunelt1 herkunelt2
Code:
foreach var of varlist `recode2' {
    recode `var'      (3=4) (4=5) (5=6) (6=3)
    recode `var'_d*   (3=4) (4=5) (5=6) (6=3)
}
At the same time, the normal recode with placeholder seems to work fine:

Code:
recode herkunelt2_d* (3=4) (4=5) (5=6) (6=3)
Why is that the case? Are the two approaches not the same?
AND: Is it in general possible to use placeholders within a loop?

Best
Marius