Dear all,
I'm quite new to stata, and I was wondering whether I'd better use a global macro in the following situation. My program includes two sub-do files where `x' is used commonly inside. When the code is executed, an error occurs because I guess the local macro, x, isn't passed into the sub-do files. Would you recommend me to use global macro instead? Or would there be an easy way to solve this?

Code:
        local x 1
        do "$project\program1.do"
        do "$project\program2.do"