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]

Re: st: how to make wmpstata recognize a global variable


From   Nick Cox <njcoxstata@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: how to make wmpstata recognize a global variable
Date   Fri, 21 Sep 2012 02:11:32 +0100

No. You should pass the value of the global (macro, not variable)
directly from one instance of Stata to another.

Nick

On Fri, Sep 21, 2012 at 1:42 AM, Pradipto Banerjee
<pradipto.banerjee@adainvestments.com> wrote:

> Consider two situations:
>
> 1. I defined a Stata global variable $xyz within the Stata GUI and then in the GUI I ran a file - do mystatacode.do - which references the $xyz global variable. In this case the code runs fine.
>
> 2. However, if I define a Stata global variable $xyz within the Stata GUI, but then I run my file mystatacode.do using a cmd shell like - wmpstata.exe /e do mystatacode.do - then the code does not recognize the global variable. Is there any way to make the wmpstata.exe file recognize the global variables defined in another instance of Stata, particularly the Stata GUI?

*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index