Hi, I got a do file that only label variables and I need to use it by running it inside another 2 do files which are basically the same but one has variables from 1996 and the other one from 2010. So I tried using this:
foreach x in 96 10{
cap label var ind1_`x' "Nro docentes /Nro alumnos pregrado v.0"
cap label var ind1_`x'_1 "Nro docentes /Nro alumnos pregrado v.1"
cap label var ind1_`x'_2 "Nro docentes /Nro alumnos pregrado v.2"
cap label var ind1_`x'_3 "Nro docentes /Nro alumnos pregrado v.3"
cap label var ind1_`x'_4 "Nro docentes /Nro alumnos pregrado v.4"
cap label var ind1_`x'_5 "Nro docentes /Nro alumnos pregrado v.5"
cap label var ind1_`x'_6 "Nro docentes /Nro alumnos pregrado v.6"
cap label var ind1_`x'_7 "Nro docentes /Nro alumnos pregrado v.7"
cap label var ind1_`x'_8 "Nro docentes /Nro alumnos pregrado v.8"
cap label var ind1_`x'_9 "Nro docentes /Nro alumnos pregrado v.9"
}
and It worked in both files ( 1996 and 2010). However I can't include this command on those do files cause the idea is to only use the comand run dofile/labels.do in both of them and the labels file should work the same way as if I were using the command on them. The thing is, it doesn't and I can't figure out why... Any thoughts?