You are correct, but there is a simple fix
local commod2 `commod2'98
A more systematic approach is
local commod2
foreach w of local commod {
local commod2 `commod2' `w'98
}
Nick
njcoxstata@gmail.com
On 9 June 2013 18:12, G. Anderson <ga274@cam.ac.uk> wrote:

Thanks a lot Nick.

That seems to almost work, but leaves the last variable in the initial
list commod unchanged:

So I get something like tea98 coffee98 sugar98 wheat for commod2. Have
tried this with a few different variables and always seems to skip the
last one.

Thanks,
Gareth
On Jun 9 2013, Nick Cox wrote:

local commod2 : subinstr local commod " " "98 ", all
local commod3 : subinstr local commod2 "98" "99", all