Stata programs that use external programs or files that are not in the adopath, for example the pandoc document converter, need to know the location of the resource. The -whereis- command helps users and developers alike by maintaining a directory of programs and files. Line 4 tells Stata the default location of files to be used and files to be created. Line 5 command tells Stata to start a log file named filename.log to echo the session. Appending a ',replace' overwrites the log file of the same name. Line 8 closes this log file. Line 6 opens up a Stata data file named filename.dta.
STATA: A Simple introduction STATA: A Brief Introduction to using Stata with MS WindowsA. Colin Cameron, Dept. Of Economics, Univ.