Statalist


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

st: Running SAS code from STATA do files


From   Dan Blanchette <[email protected]>
To   [email protected], [email protected]
Subject   st: Running SAS code from STATA do files
Date   Fri, 23 Jan 2009 16:12:56 -0500 (EST)

Michael,
I just saw your post to Stata list on Jan 12th.
I am the author of a free SAS macro called STATA_WRAPPER
that lets you run Stata from within SAS (basically the opposite
of what you want to do), but I figured it would good to at least
let you know about it.  Are you already familiar with my Stata
commands: usesas and savasas ?  Both require that have both
SAS and Stata installed on the same computer.

If you Google any of my program names you'll find my website
to download them.

I'm also the author of the webpage:
  A SAS Users Guide to Stata
that can be found just by Googling: SAS Stata

BTW, if you download/install either usesas or savasas you'll get
a program called sasexe which will find your SAS executable for you.
Then you could do this:
. sasexe
. shell "`r(wsas)'"  "C:\wherever\my_prog.sas"
I'm assuming your computer is a Windows PC.  If it's a Linux/UNIX box then it's:
. shell  "`r(usas)'"  "my_prog.sas"

Let me know if you have any Qs.


Dan Blanchette
Research Associate
Center of Entrepreneurship and Innovation
Duke University's Fuqua School of Business
Durham, NC 27708-0120
[email protected]


*
*   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–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index