Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: dofile tripping over itself


From   "Dan Weitzenfeld" <[email protected]>
To   [email protected]
Subject   st: dofile tripping over itself
Date   Mon, 21 Apr 2008 15:24:15 -0700

Hi Folks,
I'm working on a dofile that loops through a process thousands of
times.  Part of that process includes the following:

----begin code

	use "$directory/REACH_RESULTS.dta", clear
* random stuff
	save "$directory/REACH_RESULTS.dta", replace

----end code

I am repeatedly getting the following error

file C:\Documents and Settings\Dan
Weitzenfeld\Desktop\REACH_RESULTS.dta could not be opened
r(603);

...but when this error occurs, Stata has that very file open!
Moreover, the error is occuring at seemingly random times.  That is,
sometimes it will occur on the 124th run through the loop, while
others it won't occur until the 865th run through the loop.
I have had similarly random errors with a different
computationally-intensive do file.  It's as if Stata starts going so
fast it trips over itself.
Having done a good deal of coding, I am well aware of how suspicious
"randomly occurring error" sounds.  But trust me, I am changing
nothing in the do file, there is no randomness within the file, but
the error occurs at random loop iterations.
I am using Stata 10 on a Windows XP Professional SP2 on a Dell
Dimension DXP061 Core2, [email protected], 2GB ram

Has anyone else had this problem?

Thanks in advance,
Dan
*
*   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/



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