Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: do-file halting


From   Ulrich Kohler <kohler@wzb.eu>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: do-file halting
Date   Mon, 06 Jul 2009 19:53:00 +0200

Am Montag, den 06.07.2009, 13:25 -0400 schrieb Ann Miller:
> Dear Statalist, 
> 
> I'm using Stata 10 and have run into something I think is odd. When I set up a master do file that has several smaller do-files within it (eg: stage1.do stage2.do stage3.do), the master do will run up to the second-to-last one (stage2.do)and then cease, displaying the following: "end of do-file". After various struggles and consults with experts at my workplace, we've discovered that 1) it doesn't seem to read the final small do-file (stage3.do) and 2) if I add 2 carriage returns to the end of the master do-file, it'll run the whole thing. Is this a common problem? I'd be interested to know what might be the cause, if anyone else has run into this, or if there's a different solution than my 2-carriage-return fix.

In Stata, commands are not executed unless they are "entered" by a
carriage return. Hence, a different solution is to add just one carriage
return at the end of the master file (instead of two).

"Data Analysis Using Stata" written be Frauke Kreuter and myself
recommends to use  -exit- as the last line of do-files. This helps not
to forget the last carriage return and has some other advantages.

Uli


-- 
kohler@wzb.eu
+49 (0)30 25491-361

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index