diff --git a/all.sas b/all.sas index d382c14..837cd95 100644 --- a/all.sas +++ b/all.sas @@ -3474,7 +3474,12 @@ data datalines_2; */ else if upcase(format)=:'$HEX' then dataline=cats('put(trim(',name,'),',format,')'); - else dataline=name; + /** + * There is no easy way to store line breaks in a cards file. + * To discuss this, use: https://github.com/sasjs/core/issues/80 + * Removing all nonprintables with kw (keep writeable) + */ + else dataline=cats('compress(',name,', ,"kw")'); run; proc sql noprint; diff --git a/base/mp_ds2cards.sas b/base/mp_ds2cards.sas index cdfe72f..e50d2b5 100644 --- a/base/mp_ds2cards.sas +++ b/base/mp_ds2cards.sas @@ -161,7 +161,12 @@ data datalines_2; */ else if upcase(format)=:'$HEX' then dataline=cats('put(trim(',name,'),',format,')'); - else dataline=name; + /** + * There is no easy way to store line breaks in a cards file. + * To discuss this, use: https://github.com/sasjs/core/issues/80 + * Removing all nonprintables with kw (keep writeable) + */ + else dataline=cats('compress(',name,', ,"kw")'); run; proc sql noprint;