I'm currently using Stata for data management. Inspired by Nick Cox' (2021) paper "Speaking Stata: Loops in parallel", I'm experimenting with -tokenize-.

The first chunk of code below seems to work as expected. But I thought I would be able to ask -tokenize- to separate "tokens" by comma as a delimiter.
(The reason for not simply using single spaces between each word/token, is that I want the words in the local macros to line up, as shown below, making it easy to check that my code is correct. Also, a clarification: I intenionally avoid retaining the original variable names as I never modify the original data. So, I use -rename- rather than -clonevariable-.)


Code:
// Define local macros of item names, one for Norwegian and one for English
local nor_items "alene, gange, hjelp_1, hjelp_2, hjelp_3, hjelp_4, hjelp_5"
local eng_items "alone, dist,  Nclean,  Ngroc,   Nrep,    Ndigi,   Nbed"

foreach parent in mo fa {
    // Loop through the items
    while "`nor_items'" != "" & "`eng_items'" != "" {
        // Get the current token from each macro
        gettoken nor_item nor_items: nor_items
        gettoken eng_item eng_items: eng_items

        // Remove the comma from the current tokens
        local nor_item = subinstr("`nor_item'", ",", "", 1)
        local eng_item = subinstr("`eng_item'", ",", "", 1)

        // Rename variables
        fre `parent'r`nor_item'
        rename `parent'r`nor_item' `parent'_`eng_item' 
        
        // Recode missing values
        recode `parent'_`eng_item' (9996/9999 = .)
    }
}
I'm looking at the manual for -tokenize- (https://www.stata.com/manuals/pgettoken.pdf) and do find the option parse().

But this code does not work:

Code:
// Define local macros of item names, one for Norwegian and one for English
local nor_items "alene, gange, hjelp_1, hjelp_2, hjelp_3, hjelp_4, hjelp_5"
local eng_items "alone, dist,  Nclean,  Ngroc,   Nrep,    Ndigi,   Nbed"

foreach parent in mo fa {
    // Loop through the items
    // TRYING TO AVOID THIS PART while "`nor_items'" != "" & "`eng_items'" != "" {
        // Get the current token from each macro
        gettoken nor_item nor_items: nor_items, parse(",")
        gettoken eng_item eng_items: eng_items, parse(",")

        // TRYING TO AVOID THIS PART Remove the comma from the current tokens
        // local nor_item = subinstr("`nor_item'", ",", "", 1)
        // local eng_item = subinstr("`eng_item'", ",", "", 1)

        // Rename variables
        fre `parent'r`nor_item'
        rename `parent'r`nor_item' `parent'_`eng_item' 
        
        // Recode missing values
        recode `parent'_`eng_item' (9996/9999 = .)
    }
}
Stata responds:

Code:
variable far not found
I'd prefer Stata for more complex data management, given the simplicity of its code for this task. But my knowledge of Stata code is quite limited.
Yes, the first code works. But can the code be simplified, in the interest of readers when the code is published? Any help would be appreciated.

Even though Stata's error message does refer to "far", I suspect the challenge lies in my use of either one OR several spaces after the comma to separate words in the local macro.