Thanks once again to Kit Baum, a new version of the descsave package is now available for download from SSC. In Stata, use the ssc command to do this, or adoupdate if you already have an old version of descsave.

The descsave package is described as below on my website. The new version fixes a bug, which caused descsave to fail if asked to describe variables from a dataset with no variables and no observations (like the value-label-only datasets produced by the vallabsave package). The new version produces a resultsset witn no observations and no variables (as does describe), and produces an empty output do-file (if a dofile() option is specified).

Best wishes

Roger

---------------------------------------------------------------------------------------
package descsave from http://www.rogernewsonresources.org.uk/stata10
---------------------------------------------------------------------------------------

TITLE
descsave: Extension of describe creating output dataset and do-file

DESCRIPTION/AUTHOR(S)
descsave is an extended version of describe, and creates a do-file and/or
an output Stata dataset (or resultsset). The output Stata dataset has
1 observation per variable described, and data on variable attributes
(name, storage type, display format, variable label, value label, and
selected characteristics). The Stata do-file reconstructs these attributes
when run, assuming that the variable exists and is of the correct mode
(numeric or string). descsave can be used to reconstruct variables that have
been output to a generic spreadsheet using outsheet and then input using
insheet, or variables that have been extracted (using fvregen or factext)
from the label variable of an output dataset (or resultsset) created by
parmby or parmest. (The parmest, fvregen and factext packages are downloadable
from this website or from SSC.)

Author: Roger Newson
Date: 22 June 2019
Stata version: 10

INSTALLATION FILES (click here to install)
descsave.ado
descsave.sthlp
---------------------------------------------------------------------------------------
(click here to return to the previous screen)