Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: RE: Problem with ado file - stcmd


From   "Nick Cox" <n.j.cox@durham.ac.uk>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: RE: Problem with ado file - stcmd
Date   Thu, 6 Dec 2007 22:59:55 -0000

Eva has already given you very good advice. What does "not working" 
mean in your case? You do not say. 

Your program can be simplified as follows: 

prog stcmd
	version 9
	shell "C:\Program Files\StatTransfer9\st" `0' 
end

because although you define a local macro called -stpath- 
you never use it. 

Thus your program will call up StatTransfer9 if (and only if) 
on your machine there is a batch file or executable named 
st.bat or st.exe in C:\Program Files\StatTransfer9. It will
then pass it whatever arguments you feed to -stcmd-. 

If you pass it no arguments it will probably do nothing, but 
I am guessing. I have not used StatTransfer for about 15 years
and have no copy to experiment with.

Only you can tell us what is your set-up and what you are 
giving as arguments to -stcmd-, but you don't specify either. 
You are asking us to debug a problem that is mostly hidden
to us. 

Josiane Georges

I am trying to use stcmd.ado to run Stat Transfer directly in Stata, but it is not working. I've tried to use what I found in the FAQ, but it did not work. I have modified the standard stcmd.ado file to read the following:

#delim ;
prog def stcmd;
version 9.0;
/*
 Run the Stat/Transfer st command
 with parameters and switches supplied by the user.
*!Author: Roger Newson
*!Date: 04 June 2007
*/

local stpath `"$StatTransfer_path"';
if `"`stpath'"'=="" {;
  local stpath "st";
};
shell "C:\Program Files\StatTransfer9\st" `0' ;


end;
______________________

Any have and ideas on how to fix the ado file?


*
*   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/



© Copyright 1996–2022 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index