Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


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

st: Does Stata store the name of dta files


From   "Joshua Ruben" <[email protected]>
To   <[email protected]>
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–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index