help vsave

Title

vsave -- Save Stata dataset under version control

Syntax

vsave [filename] [, options]

Description

vsave saves the current dataset under the name
filename and does so in the Stata format
implied by version control.

The save command always stores datasets in the most
recent Stata format (version ),
regardless of the version the command interpreter is
set to. Stata has another command, saveold, that
writes datasets in formats that can be read by prior versions
of Stata. vsave is a hybrid of these two commands. It
acts like saveold, when the command interpreter is set
to less than the current version of Stata and is equivalent
to save otherwise.

vsave requires Stata version 11.2 and works up to
version 14 (the most recent version). The command might
continue to work in version 15 and higher, but this
cannot yet be tested.

Options

version(#) saves the dataset in Stata # format.

save_options and
saveold_options
are other options for save or saveold.

Example

Save dataset in Stata 11 format

version 11 : vsave myfile

Equivalent to above

vsave myfile , version(11)

Acknowledgments

This command is strongly inspired by Michael Stepner's save12
and save13 commands (available from the SSC), who
also suggested the version() option. He motivates the
development of these tools on
Statalist.

Author

Daniel Klein, University of Kassel, klein.daniel.81@gmail.com

Also see

Online: save, saveold, use, dta

if installed: save12, save13, use13