Hi all,
My question is related to .do files and passing arguments to them.
Let's say that I have a file called master.do, and the .do file I want
to run from master.do is called routine1.do.
Here's the syntax in the file master.do:
local quarter 2
cd C:/Directory/MyDirectory/Q`quarter'_2012/
do routine1
Here is the syntax in the file routine1.do :
use ../Q`quarter'_2012/mystatafile.dta, clear
I don't want to have to define the local "quarter" in all of the .do
files that I want to call and run in master.do. Is there any way to
pass along the quarter argument to files called in the master.do file?
Any resources you can point me to would be very helpful.
Thank you,
Erika
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/faqs/resources/statalist-faq/
* http://www.ats.ucla.edu/stat/stata/