Statalist


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

RE: st: Db with an ado


From   "Tharyan, Rajesh" <R.Tharyan@exeter.ac.uk>
To   "statalist@hsphsun2.harvard.edu" <statalist@hsphsun2.harvard.edu>
Subject   RE: st: Db with an ado
Date   Thu, 30 Apr 2009 10:16:59 +0100

Thanks all.. Following martin's advice I checked up the help for dialog programming. 
In section 5.5.1 of the help it says as below

5.5.1 stata

Syntax

stata
stata hidden [immediate | queue]
Use of option() communication:  None.

Description
stata executes the current cmdstring, optstring and displays the command in the Results window before execution, 
just as if the user had typed it.

stata hidden executes the current cmdstring, optstring, but does not display the command in the 
Results window before execution.  stata hidden may optionally be called with either
of two modifiers:  queue or immediate.  If neither modifier is specified, immediate is implied.
...

Could this be the solution? How does one use stata hidden?

Regards
rajesh


-----Original Message-----
From: owner-statalist@hsphsun2.harvard.edu [mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of Martin Weiss
Sent: 29 April 2009 15:05
To: statalist@hsphsun2.harvard.edu
Subject: AW: st: Db with an ado

<> 

I would not jump to this conclusion. Towards the end of 

*************
help dialog_programming
*************

remarks 5.5, there is a statement to the effect that " Dialogs that are launched by using the db command cause Stata to become busy and remain busy until the dialog is completely loaded."

If you run Rajesh`s commands interactively, there is no problem. If you run them from a do/ado-file, as his subject line seems to indicate, then Stata waits for your input from the dialog box, gets it, executes the rest of the do file with the "_request" and immediately afterwards implements the u-action from the dialog box, which subsequently is soaked up as the answer to the request...


HTH
Martin


-----Ursprüngliche Nachricht-----
Von: owner-statalist@hsphsun2.harvard.edu [mailto:owner-statalist@hsphsun2.harvard.edu] Im Auftrag von Maarten buis
Gesendet: Mittwoch, 29. April 2009 15:53
An: statalist@hsphsun2.harvard.edu
Betreff: Re: st: Db with an ado


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

*
*   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   |   What's new   |   Site index