Statalist


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

RE: st: tempfile already exists


From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   RE: st: tempfile already exists
Date   Fri, 31 Aug 2007 13:07:44 +0100

Nasty bug. 

I don't know the answer to the question about StataCorp's 
thoughts, but one interim answer is to write your own wrapper 
for -save- that insists on a filename being supplied. 

Nick 
[email protected] 

Steven Stillman
 
> As an aside to this post, I learned the hard way a few months 
> ago why  -
> save `tempfile', replace - should be avoided in most 
> circumstances.  If the
> macro tempfile is undefined, say because you have misspelled it (for
> example, you set - tempfile steve - but then used - save 
> `steven', replace),
> this reduces to - save, replace - which will overwrite the 
> dataset you are
> working with.
> 
> BTW, has statacorp ever thought about altering save so it 
> requires a dataset
> name?  In the circumstance above it is very dangerous that it does not
> require a dataset name.  For example, in my case, I overwrote 
> a raw dataset
> (which fortunately I had another copy of on a CD).

*
*   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