Gregory Branch ([email protected]) wrote
> The programming manual for V.7 SE lists an extended
> macro function for accessing the values of system
> environment variables by name from stata code. The
> text in the manual indicates that this is available in
> both Windows and Unix.
>
> To make a long story short, I have a common routine
> that I need to respond to a machine-specific
> parameter, and it would be vary nice if I could get at
> a the windows environment variables.
System environment variables may be accessed with the -env-
extended macro function. Here is an example:
. local x : env PATH
The local macro -x- will now contain whatever Windows has in the
PATH environment variable, and subsequent references in Stata
code to `x' wil be replaced with the contents of PATH.
--Alan
([email protected])
*
* 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/