Statalist The Stata Listserver


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

st: files left open by commands


From   "Hofer-Kivelson.Ann-Arbor" <[email protected]>
To   [email protected]
Subject   st: files left open by commands
Date   Fri, 16 Feb 2007 11:18:33 -0500

This may be a tabout  issue(a v. useful program for me) but it seems
like it may have broader issues for programing with MATA.

Every now and then when I am building a tabout command and it chokes
on something it will leave a file open (see below)

Then oddly, I can't get it closed without rebooting my computer.
The clear command, or even closing and reopening stata doesn't work
If I close stata and try to delete tables2.txt, windows will not let me.
I can't see any stata related process left active in the process list

The general interest questions would be:
1/  Is there a mata command that would close all the open files that
might be left around?

2/  Is there a programming practice that would avoid leaving a file
open in such an inconvenient way?
*********************OUTPUT*************************
. tabout `ptdem' using tables2.txt,replace  `options'


File tables2.txt
is already open inside another application.
Please close it before running tabout.
*
*   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