ReadStat
ReadStat copied to clipboard
readstat exporting value labels to sas7bcat from a Stata dta.
I have a Stata file with the following label sets:
. sysuse auto2, clear
(1978 automobile data)
. label list
repair:
1 Poor
2 Fair
3 Average
4 Good
5 Excellent
origin:
0 Domestic
1 Foreign
I want to create a sas7bcat file of Stata value labels but can't with the following command.
kc@junk:readstat auto2.dta auto2.sas7bcat
I've also tried C code with the function:
readstat_error_t readstat_begin_writing_sas7bcat(....)
If I have just one label set, the C code works. If I have more than one label set, the file is created, but I can't read the label set back:
kc@junk: readstat auto.sas7bdat auto.sas7bcat auto3.dta
Converted 12 variables and 74 rows in 0.00 seconds
Error processing auto.sas7bcat: Unable to read from file