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

st: dofile tripping over itself

From   "Carole J. Wilson" <>
Subject   st: dofile tripping over itself
Date   Mon, 21 Apr 2008 18:57:32 -0500

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
<> 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, 6600@2.40HHz, 2GB ram
> Has anyone else had this problem?
> Thanks in advance,
> Dan
> *
> *   For searches and help try:
> *
> *
> *
*   For searches and help try:

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