I am getting the same result Rajesh describes when I run his code
(using Stata 10.1 IC, 64-bit for Mac, current updates).
It's as if stata is not waiting for the dataset you choose after -db-
to load into memory before moving on to the -display- command.
I tried rerunning it with -pause- on and it worked:
********************************
clear
pause on
db use
pause
**you'll need to type "q" and press ENTER to continue**
di "do you want to list: (enter 1 for yes 2 for no)
" _request(_answer)
macro list _answer
********************************
I also tried using -sleep- after the db use command to get Stata to
wait, but it did not work. Hopefully there is a better solution out
there than using -pause- (because it's a pain to have to type "q"
everytime you want to run the do-file), but I'm not sure what that
might be.
Eric
__
Eric A. Booth
Public Policy Research Institute
Texas A&M University
[email protected]
Office: +979.845.6754
Fax: +979.845.0249
On Apr 29, 2009, at 8:52 AM, Maarten buis wrote:
--- On Wed, 29/4/09, Tharyan, Rajesh wrote:
When I issue a command followed by by a request statement
as in something like below..
. db use
. di "do you want to list: (enter 1 for yes 2 for no)
" _request(_answer)
do you want to list: (enter 1 for yes 2 for no) . use
"C:\data\results.dta", clear
Stata automatically uses the echo from the db use command
as _answer. Is there anyway to prevent this?
Sounds like there is something wrong with your Stata
instalation. The first thing you could try is type:
update all
update swap
Hope this helps,
Maarten
-----------------------------------------
Maarten L. Buis
Institut fuer Soziologie
Universitaet Tuebingen
Wilhelmstrasse 36
72074 Tuebingen
Germany
http://home.fsw.vu.nl/m.buis/
-----------------------------------------
*
* 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/
*
* 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/