help for dologx                                                  (Roger Newson)
Multiple versions of dolog for executing certification scripts

dolog6 filename [ arguments ]

dolog7 filename [ arguments ]

dolog8 filename [ arguments ]

dolog9 filename [ arguments ]

dolog10 filename [ arguments ]


The programs dologx are versions of the program dolog, each of which attempts to execute a do-file under the appropriate Stata version x. dolog is downloadable from SSC. Like do, it causes Stata to execute the commands stored in a file filename.do, echos the commands as it executes them, and creates a text log file filename.log. The program dologx executes the do-file in Stata version x, unless the user includes a version statement in the do-file. Usually, a do-file should always contain a version statement at or near the top, and then it will be executed by dolog (or dologx or do or run) in the version of Stata in which it was written. However, some do-files, such as certification scripts, should not contain a version statement, because it is important to prove that they execute correctly under multiple versions of Stata (Gould, 2001).


The dologx package is distributed separately from the dolog package. This is because the dologx package is intended for use by advanced programmers (eg programmers who write certification scripts), and such advanced programmers will often have access to two versions of Stata at the same time while in transition from one version to another, and will therefore probably want to update their versions of dologx immediately when they start to have access to the new version of Stata, and to update their versions of dolog later, when the transition is complete. Note that, if the user includes a version command at the top of a do-file, then it does not matter whether the user uses dolog or dologx, because Stata will then execute the do-file in the version of Stata indicated at the top of the do-file, as long as that version, and the version of dolog or dologx, are no higher than the version of the Stata executable being used.


The following examples execute a certification script parmest.do in Stata 7 and Stata 8, respectively, each time creating a text log file parmest.log. This is done to prove that the examples in parmest.do work under both Stata versions.

. dolog7 parmest

. dolog8 parmest


Roger Newson, Imperial College London, UK. Email: r.newson@imperial.ac.uk


Gould, W. 2001. Statistical software certification. The Stata Journal 1: 29-50.

Also see

Manual: [R] do, [R] log On-line: help for do, run, doedit, log, version, cscript help for dolog if installed