Thanks as always to Kit Baum, a new package invdesc is now available for download from SSC. In Stata, use the ssc command to do this

The invdesc package is described as below on my website, and inputs a resultsset in a frame, with 1 observation for each of a list of variables possibly present in the current frame and data on variable attributes, and modifies these variable attributes in any variables in the current frame. The resultsset may be generated using the describe command, or the SSC package descsave, and possibly augmented or reduced, or it may be created manually n a spreadsheet (generc or proprietary).

invdesc is part of a fleet of Stata 16 metadata-management packages, comprising vallabdef and vallabsave to manage metadata on value labels, xdir and descgen to manage metadata on datasets, and descsave and invdesc to manage metadata on variables. The aim of ths fleet is to enable users to write data-management programs (or minipackages) which input complicated data in ways that can be modified by modifying just the metadata. The data and the metadata typically exist in a generic format (typically tab-delmited), and are input into Stata datasets described by the metadata. I plan to give a presentation on this fleet of packages at the 2020 UK Stata Conference planned to happen in London on September and advertized at

https://www.stata.com/meeting/uk20/

if the Conference happens (which the logistics organisers seem hopeful that it will by whatever means are necessary in these difficult times).

Best wishes

Roger


----------------------------------------------------------------------------------
package invdesc from http://www.rogernewsonresources.org.uk/stata16
----------------------------------------------------------------------------------

TITLE
invdesc: Change variable attributes using a describe or descsave resultsset

DESCRIPTION/AUTHOR(S)
invdesc inputs a data frame containing descriptive data in a
describe or descsave output dataset or resultsset), and (optionally)
another (or the same) data frame, containing value labels. It uses
information in the variables in the descriptive resultsset to change
the attributes of variables in the dataset in the current data frame
in memory. These attributes can be variable mode (string or
numeric), storage type, format, value label, variable label, or
variable characteristics. The descriptive resultsset can be created
using describe or descsave, or can be created manually using a
spreadsheet (generic or proprietary), and can contain extra
variables and/or exclude variables usually present, in which case
the corresponding variable attributes are not modified The descsave
package can be downloaded from SSC using the ssc command.

Author: Roger Newson
Date: 24 April 2020
Stata version: 16

INSTALLATION FILES (click here to install)
invdesc.ado
invdesc.sthlp

ANCILLARY FILES (click here to get)
descriptive.txt
valuelabel.txt
xauto.txt
----------------------------------------------------------------------------------
(click here to return to the previous screen)