Statalist


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

st: getting list of open files


From   Jeph Herrin <[email protected]>
To   [email protected]
Subject   st: getting list of open files
Date   Tue, 05 Jan 2010 14:28:20 -0500


I have been using -file- and it's subcommands to
do a lot of report writing; thus, I have written a
number of subroutines that use file handles to output
formatted text.

These would be easier to code if I could get a list of
open file handles. -file query- (which seems to have
no documentation other than that it exists) will output
the list of file handles, their type, and status, but
only returns -r(N)-, the number of open files.

Is there another way to get the list of open file handles
in a macro where I can manipulate them? Barring something
simpler, I can write a script to open a log file, call
-file query-, close the log file, then parse the log file
into a table, but that's messy for something I would want
to call in all of my subroutines.

Any other ideas?

thanks,
Jeph

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