Hello,

I am using a loop to decode and generate variables:

Code:
foreach var of varlist S9Q1a_1-S9Q1a_6 {
  decode `var', gen(`=strlower("`var'")')
}
Following this, I am stacking the new variables:

Code:
preserve
stack s9q1a_1-s9q1a_6, into(s9q1) clear
Since I am using the loop to avoid typos, it seems like it would be a good idea to store the output of the first loop in a macro, and then stack the macro as opposed to risking typos by listing each variable.

Thanks for reading.