Question about run versus do

Question about run versus do

by Melanie Molina -
Number of replies: 2

When it comes to linking do files, whenever I type the command “run” and my do file, I don’t get any stata output (nor an error message). I am wondering why that is, if it’s supposed to give us output and that’s in theory what the word “quietly” is for. 


Also wondering what the difference is between “run” and “do”, the latter of which if I type into my third do file linking to my previous two do files, will provide me with output. 


Thanks. 

In reply to Melanie Molina

Re: Question about run versus do

by Crystal Langlais -
Hi Melanie, Thanks for posting.
Stata made some updates to its commands - I posted a note to the announcements board about this last night. Reposted the info here - hope it clarifies:

In lecture 4, we present the "run" command for use in calling and running do-files from within another do file.

A couple of students were having issues with their log files being blank when using "run". To correct this issue, you can use the command "do" instead of "run" and it should create output in your logs.

If you are curious what is happening, Stata has updated its commands as follows:

"run quietly" as introduced in lecture is now "run" ("run" runs without output now without the need to specify "quietly"). So if you use "run" now, the output is held and thus the log file is blank.

"run" as introduced in lecture is now "do". So if you use "do", the output appears and thus the log file populates.
In reply to Crystal Langlais

Re: Question about run versus do

by Melanie Molina -

Sorry, yeah. I had posted that question just before your post addressing it. Thanks.