Bookmark and Share

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

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

st: Using macros and batch running.

From   Adrian Sayers <>
Subject   st: Using macros and batch running.
Date   Sat, 02 Jul 2011 11:21:48 +0100

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


Where 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 Sayers
Medical Statistician
University of Bristol
School of Social and Community Medicine,
Canynge Hall
39 Whatley Road
United Kingdom
*   For searches and help try:

© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index