Dan, I've had some similar problems with writing to files and
discovered that the Google search application indexing function that I
installed was accessing the same file. If you happen to be running
this application, pause or stop it.
--Carole J. Wilson
On Mon, Apr 21, 2008 at 5:24 PM, Dan Weitzenfeld
<[email protected]> wrote:
> 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/
>
*
* 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/