Hi all,
In a loop I meant the variable name is T099`j'. But STATA treat only 
T099 as the variable name. I have tried [T099`j'],but it didn't work. I 
was wondering if anyone could give me some help.
Thanks a lot!
The following are  variable names:
T0990801 
T0991301 
T0991801 
T0992301 
T0992801 
T0993301 
T0993801 
T0994301
T0990802 
T0991302 
T0991802 
T0992302 
T0992802
T0993302 
T0993802 
T0994302
I used the following command:
---------------------------------------
local j 0802
forvalue i=1/8 {
   g age`i'=2006-T099`j'
    replace  age`i'=2006-T099`j'-1 if T099[`j'-1]>5
local j = `j' + 500
}
end
--------------------------------------
Stata gives the following error information:
T099 ambiguous abbreviation
r(111);
How should I let STATA know T099`j' or T099[`j'-1] is the variable name 
instead of only T099?
Thanks for your kind help!
Mandy Jia
*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/