Title

savesaslabs -- Read a sas format program and create a stata dataset

Syntax

savesaslabs sas_program , saving(dataset)

Description

savesaslabs reads a sas program (that defines sas formats) and creates a stata dataset with the relevant info. The dataset has 3 columns:

o- name, the label name

o- value, the value to be labeled

o- label, the value label itself

Note that all columns are strings. In particular, although stata values must be numeric, that's not true in sas, so all the mappings are defined and you're free to deal with it as circumstances dictate.

savesaslabs also reads any mappings of labels to variables, and stores them as a single characteristic: _dta[assign]. The format is variable-name space label-name end-of-line [repeat].

The labels described in dataset can be created as actual labels, and assigned to variables, with the importlabels command.