Dear stata users,
I have a problem.
I have a list of countries. I put them in a macro.
When I run the loop, it works fine if I only ask for
basic tasks such as describe or su.
But when I try to do a bit more complicated tasks,
nothing appeared. It proceeds only for the first country.
And the remaining is blank.
local country "Benin Togo France"
foreach i of local country {
use `i'.dta
di "I use `i'"
d
}
here it works for each country ( I have all the description).
But when I code:
local country "Benin Togo France"
foreach i of local country {
use `i'.dta
di "I use `i'"
g id = _n
codebook id
}
It works only for the first country: Benin.
. I use Benin
output omitted
. I use Togo
. I use France
What is happening?
Do I omit something?
Best regards.
Amadou.
*
* 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/