Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: st: Stata thinks files are read-only when they shouldn't be!


From   Roy Wada <[email protected]>
To   <[email protected]>
Subject   RE: st: Stata thinks files are read-only when they shouldn't be!
Date   Sun, 10 May 2009 18:03:16 -0700

 
> outreg2 lrwage lrwager firm_l firm_iqr [Self0 Self1 ...] 
> using myfile_`y', replace bdec(2) label nocons excel}
> 
> file myfile_happ.txt is read-only; cannot be modified or erased
> dr(608)
> 
> And I get this error whether myfile_happ.txt exists in the directory
> or not.
 
You usually get this error when the file is being used by another software,
usually Excel or Word. This happens when you peek at the output while 
-outreg2- is still running. This makes the file "read-only" to Stata.
 
The solution is to close the file and don't open it until Stata has 
finished running. Because Adrian's problem is intermittent, this might
be the case.
 
If you want to look at an -outreg2- file while it is still running, then
you should copy-and-paste the file (control-c, control-v), and then look 
at the duplicated file.
 
I think this is mentioned somewhere in the help file (not leave the file 
open), but a smart thing is for -outreg2- to send its own error message 
telling you to close the file.
 
If this cannot be done, then it needs to be put in the help file
 
Roy
 
_________________________________________________________________
Hotmail® has a new way to see what's up with your friends.
http://windowslive.com/Tutorial/Hotmail/WhatsNew?ocid=TXT_TAGLM_WL_HM_Tutorial_WhatsNew1_052009
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   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