Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, statalist.org is already up and running.


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

st: Does Stata store the name of dta files


From   "Joshua Ruben" <joshua.ruben@bateswhite.com>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: Does Stata store the name of dta files
Date   Thu, 30 Dec 2010 23:21:09 -0500

Hello,

A common problem I run into with Stata is trying to open dta files that are too big (error r(901)). It's more of an annoyance than a problem. Increasing the memory and loading the data set again solves the problem. I suppose I could also permanently increase the default memory for Stata. But what I'd like to do is add code to my profile that automatically adjusts the memory in Stata when I try to open a dta file so that it fits. 

My problem is that I don't know where Stata stores the name of the dta file I'm trying to open. When the file is actually loaded, the file name is automatically saved in the global S_FN. Before that--between double-clicking on the dta file and the file being loaded--Stata opens and runs profile.do. Is there a way to reference the name of the dta file on which I double-clicked from profile.do?

Please let me know if my question is at all unclear.

Thanks for the help!
Josh

*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index