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 at the end of May, and its replacement, statalist.org is already up and running.


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

st: RE: Using macros and batch running.


From   "Jesper Lindhardsen" <JESLIN01@geh.regionh.dk>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: RE: Using macros and batch running.
Date   Sun, 3 Jul 2011 22:17:18 +0200

Hi Adrian

Perhaps use -do- instead of -include-, as you can specify arguments with the -do- command (see -help do-)

BW Jesper 



-----Original Message-----
From: owner-statalist@hsphsun2.harvard.edu on behalf of Adrian Sayers
Sent: Sat 02/07/2011 12:21
To: statalist@hsphsun2.harvard.edu
Subject: st: Using macros and batch running. 
 
Hi All,



I was wondering if anyone can offer some advice?



I am trying to run some simulations, and splitting them up into pieces and 
using the batch mode might make things a lot quicker, especially if i am 
using a cluster.



I am trying to do.



forvalues i = 1/2 {

winexec "\\myserverstata11\StataMP.exe" -e include batch.do

}





Where batch.do contains

clear all

set obs 10000

gen id = _n

gen var1 = `i'

save batch`i'.dta , replace



i seem to have trouble transferring the local macros in one activation of 
stata to another activation.



I was hoping someone would know a workaround for this problem.



Many thanks in advance



Adrian

____________________________________________
Adrian Sayers
Medical Statistician
University of Bristol
School of Social and Community Medicine,
Canynge Hall
39 Whatley Road
Bristol
BS8 2PS
United Kingdom


Adrian.Sayers@bristol.ac.uk
*
*   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/

<<winmail.dat>>



© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index