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
make xpt v8 SAS-readable #207
Conversation
Hi, thank you for the contribution. Additional fixes to improve compatibility with SAS would be very welcome. |
Will do in the next days! |
When you do, please point the PR at the |
Is this ready for merge? |
I want to preserve dates and datetimes, |
Okay, I'm not in a rush so I'll leave it open for now. Let me know when you're happy with it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be better to assign the return values of readstat_convert
and xport_construct_format
to retval
, leaving in the goto
statements. I think that was the original intention of the code.
Well, this is what I had in mind: eb391f6 |
This is how good it gets right now. Table labels are not written to xpt v8 files, that is not top priority. Table labels are not read or written for SAS datasets. reading sas7bdat is reading table name but declares it file_label in ctx. Example dataset dates.sas7bdat in https://github.com/reikoch/testfiles display file_label 'dataset label for the dates test dataset just before variable formats are stored. Ready for merge if OK; can help with table label if so wished. |
The automated tests indicate a segmentation fault. This will need to be fixed before merging. |
OK Evan, |
Done! Feel free to open other PRs with additional fixes. |
Hi Evan!
I propose very few changes to make xpt version 8 files SAS-readable. On some examples ReadStat now produces readable files by setting format and informat name to blank (not nulls).
Given https://documentation.sas.com/?docsetId=movefile&docsetTarget=p0ld1i106e1xm7n16eefi7qgj8m9.htm&docsetVersion=9.4&locale=en I would be willing to improve on this PR with target to preserve also long variable names, formats, and informats. Would that be of interest to you?