Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

readstat exporting value labels to sas7bcat from a Stata dta. #279

Open
khc8749 opened this issue Aug 1, 2022 · 0 comments
Open

readstat exporting value labels to sas7bcat from a Stata dta. #279

khc8749 opened this issue Aug 1, 2022 · 0 comments

Comments

@khc8749
Copy link

khc8749 commented Aug 1, 2022

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant