Statalist


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

Re: st: Batch job on stata


From   Partha Deb <[email protected]>
To   [email protected]
Subject   Re: st: Batch job on stata
Date   Tue, 22 Apr 2008 12:06:18 -0400

Mathew's suggestion is right on. But to make your life even easier in terms of permissions and keeping track of where your do and log files are/go, try the following.

cd dirname

where dirname is the directory in which you stored your do file.

then

nohup stata -b do mydofile.do &

or

stata -b do mydofile.do &

Partha


[email protected] wrote:

When Stata is run in batch mode it automatically creates a log file with
the name of the do file being run in the directory from which Stata is run.
Your problem is probably that you do not have write permission for the
directory.  You can check with `ls -l', or attempt to create a file  `touch
myfile'.  Try starting from another directory, your home directory for
example.

For running batch jobs I prefer:

nohup stata -b do mydofile &

nohup tells linux not to stop the process if the terminal window is closed.

Mathew


Date: Mon, 21 Apr 2008 16:23:51 -0400
From: "WEI-JANG HUANG" <[email protected]>
Subject: Re: st: batch job on Linux server

Partha,

I tried what you suggested and now it's telling me 'unable to
open.....log'.  Did you need to specify the full path name when issuing
'stata' command?  I'm suspecting >I might be at the wrong place
(directory).
Weijang


Partha Deb <[email protected]> 4/18/2008 10:17 PM >>>
Commands as you have described work for me.  However, if your mydofile has
an
extension, e.g., mydofile.do, you'll need to add that to the file
specification
stata - bb do mydofile.do &

The ampersand at the end will allow you to get back to your prompt (%)
while
the Stata job is running.

Hope this helps.
*
*   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/
--
Partha Deb
Department of Economics
Hunter College
ph:  (212) 772-5435
fax: (212) 772-5398
http://urban.hunter.cuny.edu/~deb/

Emancipate yourselves from mental slavery
None but ourselves can free our minds.
	- Bob Marley

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