Brendan Halpin <[email protected]> writes:
> Can Stata tell me whether it has been invoked batch-style (stata
> -b) or not? I'd like to have profile.do behave differently in the
> two cases.
Given that it's Friday afternoon, I'll continue following myself up
and let you all know I found the answer by trial and error and now
have the following code in profile.do:
if "$S_MODE" != "batch" {
  set memory 100m
}
This allows me to set memory on a "stata -m200 -b do dofile.do"
shell command and not have it overridden by profile.do. 
Query: is there any reason to prefer one or other of "$S_VARNAME" and
c(VARNAME)?
Brendan
-- 
Brendan Halpin,  Department of Sociology,  University of Limerick,  Ireland
Tel: w +353-61-213147 f +353-61-202569 h +353-61-338562; Room F2-025 x 3147
mailto:[email protected]  http://www.ul.ie/sociology/brendan.halpin.html
*
*   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/