I don't think there is enough information here to put
a finger on your problem. For example, the code
you give does not, as far as I can see, lead
to the creation of temporary files, which are
the subject of the error messages you see.
I suggest that you get in touch directly with
tech-support at StataCorp. I guess that they will
want a fuller picture, including a full statement
of the code you are using.
Nick
[email protected]
Giovanni Vecchi
>
> I am facing a problem which is becoming recurrent, if not
> systematic, in my stata sessions.
>
> The setting is as follows. I have a set of files named 1839old.dta,
> 1840old.dta, ... up to 1891old.dta. I want to loop through
> these files,
> carry out a few changes, and save each file with a different name. The
> outline of my code is as follows:
>
> foreach year of numlist 1839(1)1891 {
>
> use `year'old, clear
>
> < do some changes >
>
> save `year'new, replace
> }
>
>
> When the code above is run I get the following error:
>
> file C:\DOCUME~1\Vecchi\LOCALS~1\Temp\ST_01000079.tmp could not be
> opened
>
> What is puzzling/disturbing is that the error above occurs at
> different
> stages of the procedure: on re-running the procedure again
> and again the
> error sometimes pop up after year 1855, other times after
> year 1857 etc.
>
> My guess is that the problem is caused by a conflict with the
> operating
> system (is it fighting Stata on memory allocation issues?).
>
> I am currently running stata under windows XP professional,
> but I obtain
> the same results under other OS.
>
> The fact that error messages of the type above have been
> recurrent in my
> past experience with stata, and the fact that other users I
> know of have
> shared the same problems suggest that the issue might be worth being
> addressed once and for all by statacorp staff.
*
* 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/