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

Newlines #254

Merged
merged 2 commits into from
Aug 19, 2019
Merged

Newlines #254

merged 2 commits into from
Aug 19, 2019

Conversation

tomweber-sas
Copy link
Contributor

The df2sd() method streams data from the data frame over to SAS to output into a SAS Data Set via STDIN and the datalines statement of a data step (in most access methods). This is all great except for when a char columns contains embedded newline characters (LF and/or CR). These characters always are considered the next input line by the data step. TERMSTR= is an option that can be used to change this default character, but on;y for file descriptors other than STDIN (socket or disk access methods, ...). So, to support this, I've added the ability to convert LF and CR to other values (x01 and x02 by default) before streaming them over, so SAS doesn't get tripped up parsing, and in the datastep (after being read) convert them back so they are stored. as was. in the data set. I've also added support to be able to override the default values, just in case that's ever needed. Shouldn't be for actual character data.
Tom

@tomweber-sas tomweber-sas merged commit 840947b into master Aug 19, 2019
@tomweber-sas tomweber-sas deleted the newlines branch August 19, 2019 16:35
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

Successfully merging this pull request may close these issues.

1 participant