help for dologx (Roger Newson)

Multiple versions of dolog for executing certification scripts

dolog16 filename [ arguments ] [ , nostop ]

dolog15 filename [ arguments ] [ , nostop ]

dolog14 filename [ arguments ] [ , nostop ]

dolog13 filename [ arguments ] [ , nostop ]

dolog12 filename [ arguments ] [ , nostop ]

dolog11 filename [ arguments ] [ , nostop ]

dolog10 filename [ arguments ] [ , nostop ]

dolog9 filename [ arguments ] [ , nostop ]

dolog8 filename [ arguments ]

dolog7 filename [ arguments ]

dolog6 filename [ arguments ]

Description

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 now probably obsolete
for users of Stata Versions 16 or above,
as the dolog package for Stata Version 16 now respects version control.

Options

nostop allows the do-file to continue executing even if an error occurs.
Normally, Stata stops executing the do-file when it detects an error
(nonzero return code).
This option is onl available for module of dologx
for Stata versions 9 or above.

Remarks

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 dologx package is probably now obsolete
for users of Stata Versions 16 or above,
as the dolog package in Stata Version 16 now respects version control.
As in:

. version 14: dolog parmest

which will be executed under Stata Version 14
if there is no version statement in the certification script parmest.do.

Examples

The following examples execute a certification script parmest.do in Stata 14 and Stata 16, 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.

. dolog14 parmest

. dolog16 parmest

Author

Roger Newson, King's College London, UK.
Email: roger.newson@kcl.ac.uk

References

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

Also see

Manual: [R] do, [R] log

Help: [R] do, [R] run, [R] log;

dolog if installed